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.
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.
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.
Thanks for replying. I attempted that method as well and it does not
work either, as you said it is equiv to em. I've been constantly
browsing the net to find a solution, but nothing is coming up. Any other
ideas that pop up let me know. Thanks in advance.
I knew em was holding the email address just fine, but you can't stick
em on the end and it just send the email, I can't put anything other
than 'an_emailAddres@something.com' otherwise I get an error....Not sure
how to get around this is my point...
Now as you can see, the #{em} did not print out the the To: statement,
but I'm not sure that it should in this instance. So I made another line
that says this:
So it seems as if em is getting the email address, but I'm still
completely lost as to why I cannot use this string to send the
emailaddress. I've changed the email to something@yahoo.com to make sure
the underscore was not causing any problems but same problem occurs.
Thanks for your time!
Brantley
···
From: Highpoint Alumni To: brantley shields Subject: HPU Alumni
--
Posted via http://www.ruby-forum.com/.
On Apr 23, 2008, at 11:56 PM, Brantley Shields wrote:
I thought the same,
I knew em was holding the email address just fine, but you can't stick
em on the end and it just send the email, I can't put anything other
than 'an_emailAddres@something.com' otherwise I get an error....Not sure
how to get around this is my point...
Brantley
--
we can deny everything, except that we have the possibility of being better. simply reflect on that.
h.h. the 14th dalai lama
On Behalf Of Brantley Shields
# I knew em was holding the email address just fine, but you
# can't stick
# em on the end and it just send the email, I can't put anything other
# than 'an_emailAddres@something.com' otherwise I get an
# error....Not sure
# how to get around this is my point...
you seem to be doing web thingy, so
1 pls replace em with another variable email or address will do. we try to avoid template clobbering..
2 when posting problems pls show logs fr client and fr server
3 put debugging options on your code, eg using net/smtp, i usually do,
smtp.set_debug_output $stderr # verbose output mail session
On Apr 23, 2008, at 11:18 PM, Brantley Shields wrote:
From: Highpoint Alumni To: brantley shields Subject: HPU Alumni
Verification Thank you for registering with us. Please click the
following link to activate your account. http://xxxx.higxxxxnt.edu/~xxxxs/alumni/verify.rbx Your password is:
xxxx
--
we can deny everything, except that we have the possibility of being better. simply reflect on that.
h.h. the 14th dalai lama
No, i think he has them the right way around. I can't see anything wrong
with what Brantley is doing though. I've included some code that I use that
does pretty much the same thing, and I know it works. The only real
difference, is I haven't used <<HEREDOC syntax. But it does the same thing.
Hopefully this will help.
The email is going from the student, to the trainer.
def submit_results(sid, cid, aid, results)
student = ::Student[sid]
result = student.submit_results(cid, aid, results)
trainer = student.get_trainer(cid)
course = ::Course[cid]
assessment = ::Assessment[aid]
submissionEmail = "From: #{student.first_name} #{student.last_name}
<#{student.email}>\n"
submissionEmail += "To: #{trainer.first_name} #{trainer.last_name}
<#{trainer.email}>\n"
submissionEmail += "Subject: Assessment Submission: '#{course.name}' -
'#{assessment.name}'\n\n"
submissionEmail += "#{student.first_name} has submitted results for '#{
assessment.name}' in '#{course.name}'.\n"
submissionEmail += "Please log in to mark #{student.first_name}'s
answers.\n\n"
Net::SMTP.start('localhost') {|smtp| smtp.send_message(submissionEmail,
student.email, trainer.email)}
result
end
···
On Thu, Apr 24, 2008 at 3:58 PM, ara.t.howard <ara.t.howard@gmail.com> wrote:
On Apr 23, 2008, at 11:56 PM, Brantley Shields wrote:
> I thought the same,
>
> I knew em was holding the email address just fine, but you can't stick
> em on the end and it just send the email, I can't put anything other
> than 'an_emailAddres@something.com' otherwise I get an error....Not sure
> how to get around this is my point...
>
>
> Brantley
>
just realized - you have the arguments reversed
it's
msg, to, from
not
msg, from, to
which is what you have i think
a @ http://codeforpeople.com/
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama
--
"Every child has many wishes. Some include a wallet, two chicks and a cigar,
but that's another story."
I've found some information that may be useful to those helping me on
this small project. The following code works just fine:
from_address = 'bshields@linus.highpoint.edu'
to_address = 'brantley_shields@yahoo.com'
Net::SMTP.start('linus.highpoint.edu') do |smtp|
smtp.send_message(myMessage,from_address,to_address)
end
So, what is the difference between " and ' to ruby? I checked the error
logs on my server (got ahold of the administrator) and the logs show a
tainted to_address. I know the email itself is not tainted and that it
will send an email address to the one being put into to_address. I've
tried multiple simple email addresses such as "hello@yahoo.com" which
would not be tainted. So I think its confusing the string or whatever
to_address is being referred to as, its interpretting it as something
else. how can I convert to_address to 'somelikethis' ?
On Apr 24, 2008, at 8:18 AM, Brantley Shields wrote:
So, what is the difference between " and ' to ruby? I checked the error
logs on my server (got ahold of the administrator) and the logs show a
tainted to_address. I know the email itself is not tainted and that it
will send an email address to the one being put into to_address. I've
tried multiple simple email addresses such as "hello@yahoo.com" which
would not be tainted. So I think its confusing the string or whatever
to_address is being referred to as, its interpretting it as something
else. how can I convert to_address to 'somelikethis' ?
--
we can deny everything, except that we have the possibility of being better. simply reflect on that.
h.h. the 14th dalai lama
myMessage: "From: Highpoint Alumni <hpualumni@highpoint.edu>\nTo:
brantley shields <brantley_shields@yahoo.com>\nSubject: HPU Alumni
Verification\n\nThank you for registering with us. Please click the
following link to activate your
account.\nhttp://linus.highpoint.edu/~bshields/alumni/verify.rbx\nYour
password is: cagenu\n"