Newsman eliminates the cost and complexity of maintaining
your own SMTP infrastructure so you can focus on
what's important: building you app!
We use the power of our service to get your emails
to the inbox instantly!
Simple SMTP relay and REST API to choose from
$config = array('ssl' => 'ssl',
'port' => '465',
'auth' => 'login',
'username' => 'myusername',
'password' => 'mypassword');
$transport = new Zend_Mail_Transport_Smtp('smtp.server.com', $config);
$mail = new Zend_Mail();
$mail->setBodyText('This is the text of the mail.');
$mail->setFrom('sender@test.com', 'Some Sender');
$mail->addTo('recipient@test.com', 'Some Recip');
$mail->setSubject('TestSubject');
$mail->send($transport);
curl --url "smtps://smtp.server.com:465" \
--ssl-reqd \
--mail-from "sender@test.com" \
--mail-rcpt "recipient@test.com" \
--upload-file mail.txt \
--user "myusername:password"
mail.txt must be like:
From: "Some Sender" <sender@test.com>
To: "Some Recip" <recipient@test.com>
Subject: Testmail
Hi John Doe,
I'm sending this mail with curl thru my NewsmanSMTP account.
Bye!
import smtplib
sender = 'sender@test.com'
receivers = ['recipient@test.com']
message = """From: Some Sender <sender@test.com>
To: Some Recip <recipient@test.com>
Subject: Testmail
This is a test e-mail message.
"""
smtpObj = smtplib.SMTP('smtp.server.com', 465)
smtpObj.ehlo()
smtpObj.starttls()
smtpObj.ehlo()
smtpObj.login("myusername", "mypassword")
smtpObj.sendmail(sender, receivers, message)
require 'rubygems'
require 'smtp_tls'
require 'net/smtp'
message = <<MESSAGE_END
From: Some Sender <sender@test.com>
To: Some Recip <recipient@test.com>
Subject: Testmail
This is a test e-mail message.
MESSAGE_END
smtp = Net::SMTP.new 'smtp.server.com', 465
smtp.enable_starttls
smtp.start(Socket.gethostname,'myusername','mypassword',:login) do |server|
server.send_message message, 'sender@test.com', 'recipient@test.com'
end
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.server.com");
props.put("mail.smtp.port", 465);
props.put("mail.smtp.user", "myusername");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", 465);
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
props.put("mail.smtp.socketFactory.fallback", "false");
Session session = Session.getDefaultInstance(props, null);
session.setDebug(true);
MimeMessage message = new MimeMessage(session);
message.setText("This is a test e-mail message.");
message.setSubject("Testmail");
message.setFrom(new InternetAddress("sender@test.com"));
message.addRecipient(RecipientType.TO, new InternetAddress("recipient@test.com"));
message.saveChanges();
Transport transport = session.getTransport("smtp");
transport.connect("smtp.server.com", "myusername", "mypassword");
transport.sendMessage(message, message.getAllRecipients());
transport.close();
Our team is here with you every step of the way. Ask anything, we'll reply fast.
Get access to a real person with experience building and running configurations like yours.
Get in touch!