J
Joseph Clark
I am having an interesting issue. I just recently modified a script from
sending to a single address to multiple. The emails are sent, but when
you look at the To field in the email clients it is all messed up. For
instance when I attempt a reply to all it only thinks there is one
address that is a combination of the two I sent to.
require 'net/smtp'
toEmail = Array.new
toEmail << "1NAME \<[email protected]\>"
toEmail << "2NAME \<[email protected]\>"
fromEmail = "(e-mail address removed)"
fromEmailAlias = "MEMEME"
emailSubject = "Subject"
message = <<MESSAGE_END
From: #{fromEmailAlias} <#{fromEmail}>
To: #{toEmail}
MIME-Version: 1.0
Content-type: text/html
Subject: #{emailSubject}
Email test
MESSAGE_END
Net::SMTP.start('smtp.server.com', 25, 'server.com', 'username',
'password',
lain) do |smtp|
smtp.send_message message, fromEmail, toEmail
end
sending to a single address to multiple. The emails are sent, but when
you look at the To field in the email clients it is all messed up. For
instance when I attempt a reply to all it only thinks there is one
address that is a combination of the two I sent to.
require 'net/smtp'
toEmail = Array.new
toEmail << "1NAME \<[email protected]\>"
toEmail << "2NAME \<[email protected]\>"
fromEmail = "(e-mail address removed)"
fromEmailAlias = "MEMEME"
emailSubject = "Subject"
message = <<MESSAGE_END
From: #{fromEmailAlias} <#{fromEmail}>
To: #{toEmail}
MIME-Version: 1.0
Content-type: text/html
Subject: #{emailSubject}
Email test
MESSAGE_END
Net::SMTP.start('smtp.server.com', 25, 'server.com', 'username',
'password',
smtp.send_message message, fromEmail, toEmail
end