Zend You can directly integrate Zend’s mail module with Aritic Mail to use our SMTP servers for outgoing messages. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 <?php require_once ‘$HOME/ariticmailid/Zend/library/Zend/Mail.php’; require_once ‘/$HOME/ariticmailid/Zend/library/Zend/Mail/Transport/Smtp.php’; $smtpServer = ‘mail.ariticmail.com’; $username = $password ..
Category : Integrate Frameworks with Aritic Mail
Symfony Symfony uses SwiftMailer to send email, read more about sending emails from Symfony. To get started you need to modify parameters.yml and add the following: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 mailer: class: sfMailer param: logging: %SF_LOGGING_ENABLED% charset: %SF_CHARSET% delivery_strategy: realtime transport: class: Swift_SmtpTransport param: host: mail.ariticmail.com ..
Ruby on Rails This example shows how to send an email for user signups. You can also checkout this gem for more advanced features. Setup ActionMailer Let’s generate a Mailer class. Mailer classes function as our controllers for email views. 1 $ rails generate mailer UserNotifier Now we open up the mailer we’ve just generated, app/mailers/user_notifier.rb and add ..
Laravel Laravel provides a clean API over the popular SwiftMailer library with drivers for SMTP, PHP’s,mail sendmail and more. For this example, we’ll be sending an email to Aritic Mail using the SMTP Driver. For more information, check out the docs for Laravel’s Mail interface. Laravel 5.5 LTS uses Mailable classes. Mailable in Laravel abstracts building emails with ..
CodeIgniter CodeIgniter comes with an email sending library built in. See more information on how to use CodeIgniter with Aritic Mail. It is important to use the correct end of lines using “crlf” => “\r\n” and “newline” => “\r\n”. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ..
CakePHP CakePHP comes with an email library that already supports SMTP. For more information check out the CakePHP documentation page. This example shows how to send an email with both HTML and text bodies. In app/views/layouts/ you need to define the layout of your text and HTML emails: 1 2 3 4 5 email/ html/ default.ctp text/ default.ctp ..
Django There is more detailed information about sending an email over SMTP with Django on the Django project website. First, start by adding the following to settings.py: 1 2 3 4 5 EMAIL_HOST = ‘mail.ariticmail.com’ EMAIL_HOST_USER = ‘ariticmail_username’ EMAIL_HOST_PASSWORD = ‘ariticmail_password’ EMAIL_PORT = 25 EMAIL_USE_TLS = True Then to send email you can do the following: 1 ..