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 <your@mail.address>
To: Destination Address <someone@example.com>
Subject: test message
Date: Sat, 23 Jun 2001 16:26:43 +0900
Message-Id: <unique.message.id.string@example.com>
<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,
'your@mail.address',
'his_addess@example.com'
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. how does struts work in netbeans 6.9.1?what are th
View Tutorial          By: gunavathi at 2014-05-14 08:00:56

2. Thnx A Lot...very healpful...........
View Tutorial          By: vinay at 2012-07-19 09:21:20

3. Its very usefull to clear understanding for us .Th
View Tutorial          By: vijay at 2015-07-16 09:29:40

4. This is a nice introduction. Thanks a lot.
View Tutorial          By: Provas Kumar Saha at 2010-04-26 02:38:34

5. Everything is running.... But it doesn't send....
View Tutorial          By: Amirtharaj at 2009-04-14 05:26:26

6. //Convert numbers to word as per Indian number sys
View Tutorial          By: Abhishek at 2011-09-05 10:42:20

7. thank for this script
because i will work

View Tutorial          By: r at 2009-06-27 05:07:31

8. 1==how can we use vb.net web service data in JSF?<
View Tutorial          By: kumaraswamy at 2009-01-06 23:56:53

9. Hi , it was nice tutorial to understand the differ
View Tutorial          By: jagan at 2014-06-05 05:13:59

10. Thank you for your simple example which will help
View Tutorial          By: eekld at 2012-01-04 15:46:48