grogers Posted November 11, 2010 Share Posted November 11, 2010 I'm guessing this is more of a hosting/mail question than specifically php, but here goes... I have this very basic code to send a test email: <?php $to = 'me@mydomain.com'; $subject = 'Test email'; $message = "Hello World!"; $mail_sent = mail( $to, $subject, $message); echo $mail_sent ? "Mail sent" : "Mail failed"; ?> and the following in my php5.ini: [mail function] SMTP = relay-hosting.secureserver.net sendmail_from = admin@malvernaquarium.com When the mail is received, it's showing as coming from "auserid@p3nlh263.shr.prod.phx3.secureserver.net". How can I get this to show as something more reasonable and related to my domain? Ideally something more like admin@malvernaquarium.com. Thanks in advance! Greg Quote Link to comment https://forums.phpfreaks.com/topic/218431-basic-mail-question/ Share on other sites More sharing options...
ManiacDan Posted November 11, 2010 Share Posted November 11, 2010 The next argument to the mail() function are the email's headers, which contain FROM and REPLY-TO. -Dan Quote Link to comment https://forums.phpfreaks.com/topic/218431-basic-mail-question/#findComment-1133191 Share on other sites More sharing options...
Rifts Posted November 11, 2010 Share Posted November 11, 2010 http://www.htmlite.com/php029.php should help Quote Link to comment https://forums.phpfreaks.com/topic/218431-basic-mail-question/#findComment-1133208 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.