Category Archives: Support

translate

Usage for apps of multiple languages. $this->translate (“some text”); If you specify other languages confg/config.ini file this way: translations = pl phpway will create new file pl.php in config/dictionary/ directory config/dictionary/pl.php with new content. $text['some text']=’some text’; Here you can type text in polish language. $text['some text']=’jakis tekst’; To show your app with polish language [...]

Smtp

Smtp configuration edit config/config.ini [ActionMailer] address = mail.example.com port = 25 domain = example.com user_name = admin@example password = user_password ttl = false Code setting basic header $this->Mail->to(‘”USER NAME” ‘); $this->Mail->from(‘”USER NAME” ‘); $this->Mail->subject(“SUBJECT”); adding attachments $this>Mail->attachment(DIR_PUBLIC . ‘file.txt’); $this>Mail->attachment(DIR_PUBLIC . ‘another_file.txt’); setting body $body = $this->render_to_string(‘/notifier/registration’); $this->Mail->plain($body); or $this->Mail->html($body); or $this->Mail->body($body); send an email [...]