D
Dave Lilley
Okay I am officially stumped!!!
output from my current code looks like this (from my client inbox, yahoo
and gmail.
[ No Subject ] From (e-mail address removed)
To: (e-mail address removed)
Subject: test
Date: Wed Aug 04 22:37:47 +1200 2010
Message-Id: Wed Aug 04 22:37:47 +1200 2010
This is a test <<< Just want to see this
I want it to look as if the email was sent by a client email program
(note i use Linux for development but don't know if this will be the end
OS, I'd like it to be).
code I currently use is (and if I change it to a class I get NO
CHANGE!!) ...
require 'net/smtp'
module Sendemail
def send_email(from, to, subject, message) # edited
msg = "From: #{from}\n
To: #{to}\n
Subject: #{subject}\n
Date: #{Time.now}\n
Message-Id: #{Time.now}\n\n\n
#{message}"
Net::SMTP.start('smtp.isp.com',25) do |smtp|
smtp.send_message(msg, from, to)
end
end
end
And if i use the parameter message instead of msg I still don't get teh
subject to appear, so this fixes 1 problem but not the other.
Okay USE PONY well this is the output - NO DIFFERENCE.
[ No Subject ]
...
From:
"(e-mail address removed)" <[email protected]>
...
View Contact
To:
To: (e-mail address removed)
Subject: test
Date: Wed Aug 04 22:52:25 +1200 2010
Message-Id: Wed Aug 04 22:52:25 +1200 2010
This is a test
this is the code used for pony as you can see not a lot of difference to
my hand crafted code (but I did hope).
require 'pony'
module Sendemail
def send_email(from, to, subject, msg)
Pony.mailto => "#{to}", :from => "#{from}", :subject =>
"#{subject}", :body => "#{msg}", :via => :smtp, :via_options => {
:address => 'smtp.isp.com',
ort => '25'})
end
end
Now I've tried using authentication and password but this changes
nothing!!!
changing both bits of code to a class does nothing! using esmtp does
nothing too.
you're help would be apprec
taking the NET::SMTP piece of code into my calling program changes
nothing!!!.
how can I simply get to appear what you would see if you used you're
client email program? namely from
output from my current code looks like this (from my client inbox, yahoo
and gmail.
[ No Subject ] From (e-mail address removed)
To: (e-mail address removed)
Subject: test
Date: Wed Aug 04 22:37:47 +1200 2010
Message-Id: Wed Aug 04 22:37:47 +1200 2010
This is a test <<< Just want to see this
I want it to look as if the email was sent by a client email program
(note i use Linux for development but don't know if this will be the end
OS, I'd like it to be).
code I currently use is (and if I change it to a class I get NO
CHANGE!!) ...
require 'net/smtp'
module Sendemail
def send_email(from, to, subject, message) # edited
msg = "From: #{from}\n
To: #{to}\n
Subject: #{subject}\n
Date: #{Time.now}\n
Message-Id: #{Time.now}\n\n\n
#{message}"
Net::SMTP.start('smtp.isp.com',25) do |smtp|
smtp.send_message(msg, from, to)
end
end
end
And if i use the parameter message instead of msg I still don't get teh
subject to appear, so this fixes 1 problem but not the other.
Okay USE PONY well this is the output - NO DIFFERENCE.
[ No Subject ]
...
From:
"(e-mail address removed)" <[email protected]>
...
View Contact
To:
To: (e-mail address removed)
Subject: test
Date: Wed Aug 04 22:52:25 +1200 2010
Message-Id: Wed Aug 04 22:52:25 +1200 2010
This is a test
this is the code used for pony as you can see not a lot of difference to
my hand crafted code (but I did hope).
require 'pony'
module Sendemail
def send_email(from, to, subject, msg)
Pony.mailto => "#{to}", :from => "#{from}", :subject =>
"#{subject}", :body => "#{msg}", :via => :smtp, :via_options => {
:address => 'smtp.isp.com',
ort => '25'})
end
end
Now I've tried using authentication and password but this changes
nothing!!!
changing both bits of code to a class does nothing! using esmtp does
nothing too.
you're help would be apprec
taking the NET::SMTP piece of code into my calling program changes
nothing!!!.
how can I simply get to appear what you would see if you used you're
client email program? namely from