Comment on Tutorial - Sending emails using SMTP in Ruby By James Edward Gray II



Comment Added by : Sonal

Comment Added at : 2012-11-07 07:05:33

Comment on Tutorial : Sending emails using SMTP in Ruby By James Edward Gray II
how can i use <img> tag in message body?

msgstr = <<END_OF_MESSAGE
From: Your Name <[email protected]>
To: Destination Address <[email protected]>
Subject: test message
Date: Sat, 23 Jun 2001 16:26:43 +0900
Message-Id: <[email protected]>
<img src = "/my_prj/public/logo.jpeg" alt = "logo">
This is a test message.
END_OF_MESSAGE

require 'net/smtp'
Net::SMTP.start('your.smtp.server', 25) do |smtp|
smtp.send_message msgstr,
'[email protected]',
'[email protected]'
end


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. its not working.
View Tutorial          By: raja at 2012-08-29 11:44:45

2. its giving exception
javax.comm.NoSuchPortE

View Tutorial          By: Dc at 2012-06-07 04:08:19

3. I need JSP Code to send SMS to mobile.
View Tutorial          By: nana at 2010-03-12 22:43:22

4. i Want the Flow Chart and code for the mobile Cale
View Tutorial          By: Sudip Khatiwara at 2010-03-15 04:10:41

5. good. keep it up !
View Tutorial          By: hashu at 2011-06-21 01:49:59

6. hi,
there is no main method in SMSClient.ja

View Tutorial          By: raju at 2010-01-22 08:28:45

7. good.
View Tutorial          By: Karthik at 2007-10-20 07:03:20

8. The tutorial is very usefull, i am happy now
View Tutorial          By: Haneefa at 2013-03-30 06:31:47

9. Thanks.I was searching the internet for a lot of t
View Tutorial          By: Habi at 2011-12-22 07:43:51

10. enter no of line: 5 not fix value
out put i

View Tutorial          By: mark at 2013-01-31 14:30:00