Servername Showing up on Text Message

software development

#1

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.0\n”;
$headers .= “Content-Type: text/plain; charset=us-ascii\n”;
$headers .= “From: RemindAlert demo@remindalert.com\n”;
$headers .= “X-Sender: demo@remindalert.com\n”;
$headers .= “X-Mailer: PHP\n”;
$headers .= “X-Priority: 3\n”;
$headers .= “Return-Path: support@remindalert.com\n”;

Thanks for the help.


#2

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


#3

Wow. that worked out great!!!

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


#4

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


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )