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



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. fantastic explaination about XML parsers
View Tutorial          By: smitha at 2011-05-15 04:53:00

2. Hi! I'm working on Ubuntu 10.04

At

View Tutorial          By: Rushabh at 2011-01-12 06:22:43

3. Simple and easy code..........
View Tutorial          By: mandalson at 2011-12-24 04:08:12

4. IT IS VERY USEFUL FOR BEGINNERS
View Tutorial          By: Adhi Rudran at 2007-04-16 02:58:47

5. If I have reliance netconnect connected to my lapt
View Tutorial          By: Shaik Allabakash at 2010-02-09 19:38:10

6. thanks nice article , but there is bug as already
View Tutorial          By: YZ at 2011-08-05 13:10:49

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

8. i get exception NoSuchPortException. i tried on di
View Tutorial          By: harryjoy at 2009-11-22 05:52:48

9. hi
Can you anyone please post me the entir

View Tutorial          By: yasmeen at 2009-05-25 02:42:44

10. dear! can you show me about "How to start as
View Tutorial          By: vatha chhean at 2011-05-31 07:34:42