Showing posts with label tutorial. Show all posts
Showing posts with label tutorial. Show all posts

Monday, February 6, 2012

How to Send Joomla Emails Through JangoSMTP

If you're using Joomla to manage your website, then you don't need any additional plugins to start sending through JangoSMTP. Just go to Global Configuration, then Server, then change the Mail Settings in the lower right-hand corner of that screen.

Mailer: SMTP
From Email: Your Stored From Address
From Name: Your Name
SMTP Authentication: Yes
SMTP Port: 25 SMTP
Username: Your JangoSMTP Username
SMTP Password: Your JangoSMTP Password
SMTP Host: relay.jangosmtp.net

Your settings should look something like this:

Tuesday, January 24, 2012

Sending Transactional Messages from a Ruby Application

Do you need to send transactional emails from a Ruby application? Do you need open tracking, DKIM signing and easy to read reports? If so, then JangoSMTP is your solution.

This example demonstrates how to send messages using JangoSMTP from within a Ruby application. You will need the Mail gem, which can be installed with the command gem install mail.

After the mail gem is installed, download the source code for this example and insert your own JangoSMTP username/password/etc. It's as easy as that!
require 'mail'

Mail.defaults do
  delivery_method :smtp, { :address   => "relay.jangosmtp.net",
                           :port      => 25,
                           :domain    => "YourDomain.com",
                           :user_name => "Your Username",
                           :password  => "Your Password",
                           :authentication => 'plain',
                           :enable_starttls_auto => true }
end

# Set up your email
# The from address must be stored in your list of from addresses
# see Settings > Advanced > From Addresses
mail = Mail.deliver do
  to 'To@EmailAddress.com'
  from 'From Name <FromAddress@YourDomain.com>'
  subject 'This is the subject!'
  text_part do
    body 'This plain text email was sent by Ruby!'
  end
  html_part do
    content_type 'text/html; charset=UTF-8'
    body '<b>This HTML email was sent by Ruby!</b>'
  end
end