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. can u explain about printStackTrace()method.what i
View Tutorial          By: himabindu at 2009-06-10 20:03:14

2. You can also include a hidden field of the same na
View Tutorial          By: Stray at 2010-01-05 08:07:47

3. I have a website and i want to make a option to se
View Tutorial          By: rasel at 2011-11-26 15:50:49

4. Hi all
Can you please tell ,how to recei

View Tutorial          By: Nanthini at 2011-09-07 16:48:04

5. hey. How would i get the ClientLists displayed in
View Tutorial          By: andrew at 2009-07-24 14:10:24

6. Hi,
Nice example....it's a good one to impl

View Tutorial          By: Anish at 2009-07-08 00:21:16

7. plz wait for your solution
View Tutorial          By: Desai Rajesh at 2010-03-11 22:00:32

8. simple way friends:
public class palindrome

View Tutorial          By: Manoj at 2013-01-07 02:18:00

9. Thank you... I have the same problem , I have date
View Tutorial          By: makoy at 2012-01-16 09:06:34

10. I need how to connect with database connection in
View Tutorial          By: BenGunn at 2010-01-12 03:33:44