Philipp Hofmann
4/24/2008 3:33:00 AM
ok i had another look at this example, which doesn't look bad at
all. for i'm not able to find an error i've to ask: are you sure that
cgi['email'] actually holds the emailaddress desired? Does the
emailaddress appear in the generated content of the message?
g phil
On Thu, Apr 24, 2008 at 11:28:16AM +0900, Brantley Shields wrote:
> Greetings,
>
> This is my first time posting but this problem I am having is really
> annoying.
>
> Here is a section of my code:
>
>
> fname = cgi['fname']
> lname = cgi['lname']
> pw = cgi['password']
> em = cgi['email']
> buf = "<body bgcolor=gray><br>"
>
> myMessage = <<END_OF_MESSAGE
> From: Highpoint Alumni <hpualumni@highpoint.edu>
> To: #{fname} #{lname} <#{em}>
> Subject: HPU Alumni Verification
>
> Thank you for registering with Highpoint Alumni. Please click the
> following link in order to activate your account.
>
> Your password is: #{pw}
> END_OF_MESSAGE
>
> Net::SMTP.start('linus.xxxxxx.edu') do |smtp|
> smtp.send_message myMessage,
> 'hpualumni@xxxx.edu', em
> end
>
> end
>
> I've x'd out some of the information. But the problem I am having I
> think is that it will not allow me to use "em" as an email address to
> send. I can physically change em to 'whateveriwant@whatever.com' and it
> will work perfectly fine. I'm taking this email address out of a
> POST-REQUEST form so I need the flexibility to store it as a variable
> and send whatever that variable the email is. Any suggestions would be
> awesome, and if you need more information please let me know.
>
> Brantley