By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,521 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,521 IT Pros & Developers. It's quick & easy.

Emailing via Script

100+
P: 133
Hi,

I have a script on my website and when a user posts to the script it sends an email out.

Untill recently this has been working fine then all of a sudden it stopped sending email's out.

In the script i have this section:

[PHP]
$headers = "From: Website Name <noreply@website.com>\n";
$headers .= "Reply-To: Website Name <noreply@website.com>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";
[/PHP]

I found if i replace the above with this:

[PHP]
$headers = "From: Website Name <>\n";
$headers .= "Reply-To: Website Name <>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";
[/PHP]

It works fine, but the emails come through without saying what email address it has come from.

Why would this happen and how can i fix it so i can put the email address back in.

Cheers,
Adam
Aug 29 '08 #1
Share this Question
Share on Google+
2 Replies


pbmods
Expert 5K+
P: 5,821
Heya, Adam.

It looks like you removed the email address from the 'From' and 'Reply-To' headers, which is why the email gets delivered without this information.
Aug 29 '08 #2

100+
P: 133
Hi,

I think you have mis-understood my problem, basically it will not send out the emails when i put in the to field.

It was working fine but then it stopped working like the server had reached a limit or something?

When i removed the from address it worked fine.

Cheers,
Adam
Sep 1 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.