PDA

View Full Version : using php to send an email from an address


Zaphodbeblebrox
07-25-2005, 06:15 PM
Hi there! I was wondering if it is possible to have someone send an email from my flash site to an email address, but have the email sent 'from' the sender's address (eg. They send the message and their email from the flash site, then when I read the email, I just hit reply to send a message back)

I'm sure this is possible, but I've never used PHP before, so I have no idea where to start...Thanks for your help!


-Zaphodbeblebrox

Curly Brace
07-25-2005, 07:14 PM
Yes, that's possible:

mail("[email protected]", "Subject", "message", "From: fake_sender@fake_host.com\r\nReply-To: fake_sender@fake_host.com");

Zaphodbeblebrox
07-25-2005, 08:12 PM
thanks!

Zaphodbeblebrox
07-25-2005, 08:18 PM
oh, I don't need to do this now, but I might later on... is it possible to send an attachment with the email, and if so, how?