Jump to content

Basic mail() question


grogers

Recommended Posts

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 = '[email protected]';
$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 = [email protected]

 

 

When the mail is received, it's showing as coming from "[email protected]".

 

How can I get this to show as something more reasonable and related to my domain?  Ideally something more like [email protected].

 

Thanks in advance!

 

Greg

Link to comment
https://forums.phpfreaks.com/topic/218431-basic-mail-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.