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. no output is shown
View Tutorial          By: shubham bansal at 2015-02-21 15:36:31

2. javax.microedition.media.MediaException: Malformed
View Tutorial          By: adi at 2012-04-01 11:51:17

3. Hi,

Could you forward me the code a

View Tutorial          By: vikas at 2011-06-22 07:02:48

4. How to find port names in pc? like COM1 etc ? i wn
View Tutorial          By: layiba at 2013-12-25 08:28:30

5. nice one ...
View Tutorial          By: vamsi at 2011-11-11 06:41:25

6. Thanks a lot! simple and clear explanation! Great!
View Tutorial          By: Fabio Henrique at 2010-03-29 15:23:56

7. thank you.
View Tutorial          By: lluulnw at 2014-11-22 12:39:35

8. Hai everyone,I am getting error like *** time out
View Tutorial          By: Prasad at 2011-08-30 06:28:44

9. Is it possible to create a Reader class without lo
View Tutorial          By: bs at 2010-10-11 05:42:34

10. Sir , I am doing B.Tech . I want to know more abou
View Tutorial          By: amita saini at 2011-08-05 13:07:35