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. What is the difference between an Interface and an
View Tutorial          By: RAJA at 2015-06-26 17:28:31

2. Really nice tutorial for memset(), memcopy() and m
View Tutorial          By: Hitesh Kumar at 2012-09-03 09:16:32

3. I have already establish connection with mysql in
View Tutorial          By: shaishav at 2013-06-20 04:27:44

4. pls give me code for exact communication between
View Tutorial          By: SIRAJ at 2009-02-19 06:24:10

5. This is the help full sites for diploma student
View Tutorial          By: Tanuja at 2013-08-11 09:41:55

6. All in all is not a comment.bt a question How 2 us
View Tutorial          By: Tkalani at 2009-06-03 02:16:14

7. thank's
View Tutorial          By: gerald at 2010-08-06 01:21:39

8. i was told to write a class which wl work as Strin
View Tutorial          By: ireen at 2011-04-13 04:59:31

9. HI . i got the following exception while start up
View Tutorial          By: Ramesh at 2011-02-01 00:14:14

10. http://www.java-samples.com/showtutorial.php?tutor
View Tutorial          By: Prab at 2009-04-13 11:54:17