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 you explain when the user input through the ab
View Tutorial          By: mujmil at 2008-02-11 18:46:00

2. Nice one , Compailed no Errors ... but when execut
View Tutorial          By: Diamant at 2012-12-04 00:17:11

3. Thanks a lot. I've been stuck on this issue for qu
View Tutorial          By: Mark at 2008-04-12 22:01:56

4. thanks! it helped!
View Tutorial          By: shgy at 2015-03-17 07:42:40

5. i can saved when i run the program...
but w

View Tutorial          By: kathleen ashley at 2010-08-02 05:22:46

6. i want to learn the java from basics onwards.
View Tutorial          By: vinay at 2010-03-08 22:54:15

7. Is it possible to define a class such that the pri
View Tutorial          By: Smithy at 2012-05-01 22:50:58

8. Can you Please send me the code for movable clock
View Tutorial          By: Rajagopal at 2008-09-29 23:10:57

9. where i put this rar file to include comm api
View Tutorial          By: shubham bansal at 2015-02-20 12:13:16

10. To execute program you need comm.jar that is not a
View Tutorial          By: shreyansh shah at 2012-07-11 05:57:42