Servername Showing up on Text Message

Servername Showing up on Text Message

Posted by: briandichiara
Posted on: 2006-06-21 23:01:00

I'm using PHP Mail function to send a text message to a cell phone. I get different results with different services, however with Verizon Wireless, the sender shows up as:

mydreamhostusername@myserver.dreamhost.com

anybody know the correct headers to use to fix this problem?

Here are my current headers:

$headers = "MIME-Version: 1.0n";
$headers .= "Content-Type: text/plain; charset=us-asciin";
$headers .= "From: RemindAlert <demo@remindalert.com>n";
$headers .= "X-Sender: <demo@remindalert.com>n";
$headers .= "X-Mailer: PHPn";
$headers .= "X-Priority: 3n";
$headers .= "Return-Path: <support@remindalert.com>n";

Thanks for the help.

Re: Servername Showing up on Text Message

Posted by: crimsondryad
Posted on: 2006-06-22 22:21:00

Try using PHPMailer. http://phpmailer.sourceforge.net/ There's a great tutorial on how to use it on PHPFreaks.com.

http://www.phpfreaks.com/tutorials/130/0.php

It does all the work for you. I was trying to set the headers before, it was a pain. This is much easier.

================================
Angela Gann
CrimsonDryad Web Design Services
Web Design, Custom Software Development
http://www.crimsondryad.com

Re: Servername Showing up on Text Message

Posted by: briandichiara
Posted on: 2006-06-22 23:23:00

Wow. that worked out great!!!

Thanks for the tip. Much cooler than mail()!!!

Re: Servername Showing up on Text Message

Posted by: Raz2133
Posted on: 2006-06-23 02:45:00

In reply to:

anybody know the correct headers to use to fix this problem?


I believe this issue can be solved by using the optional 5th parameter of the mail() function to pass the -f parameter to sendmail.

Something like...

mail($to, $subject, $message, $headers, '-fuser@domain.com');

Mark

Tags: php mailmail functionheadersdreamhosttext messagecharset