Tuesday, August 31, 2010

how to test smtp account with ruby

To check smtp account working or not use below ruby script for smtp verification save the file with ruby extension

require 'net/smtp'

message = <<>
To: A Test User
Subject: SMTP e-mail test
This is a test e-mail message.

Net::SMTP.start('domain.com',25,'doamin.com','chetu','amin') do |smtp|
smtp.send_message message, 'chetu_242000@gmail.com',

No comments: