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

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

Java program to check if user input is an even number

Archived Comments

1. hey Mounika..did u solve ur problem ??if u did ple
View Tutorial          By: agnas at 2008-04-28 23:59:37

2. That was nice.
View Tutorial          By: Arnab at 2007-10-17 02:02:11

3. Hai.. i tried with d above code but am getting an
View Tutorial          By: muthupandi at 2010-08-17 09:49:23

4. hi.I am new in j2me and really want to learn more
View Tutorial          By: Vicky Mittal at 2012-01-05 11:45:53

5. DON'T USE GETS!!!!!!!!!!!!!!! IT'S DANGEROUS!
View Tutorial          By: Caterpillar at 2012-04-23 13:22:42

6. hai, i tried the abvoe code, m getting the follwin
View Tutorial          By: charan at 2011-10-20 12:59:59

7. Nice article, Thank you
View Tutorial          By: kumar kasimala at 2010-04-26 21:09:25

8. Good one.. great for beginners..
View Tutorial          By: varun at 2009-09-29 14:18:04

9. Good Luck....
View Tutorial          By: nagarajan at 2011-06-19 03:55:49

10. import java.io.*;
class CharaaDemofromnet
View Tutorial          By: bond at 2014-08-16 17:02:10