RE: [PHP] SMS E-Mail and other oddities
[snip] Send us some source code and we can help you out! [/snip] Always reply to the list and please do not top post. $poot = ini_set(sendmail_from, '[EMAIL PROTECTED]'); $smsTo = $_POST['smsPhone'] . '@sms.myserver.com'; $to = $smsTo; $subject = $_POST['smsSubject']; $message = $_POST['smsMessage']; $headers = 'From: '. $poot . \r\n . 'Reply-To: '. $poot . \r\n; echo $to; mail($to, $subject, $message, $headers); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS E-Mail and other oddities
On 5/11/06, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Send us some source code and we can help you out! [/snip] Always reply to the list and please do not top post. $poot = ini_set(sendmail_from, '[EMAIL PROTECTED]'); $smsTo = $_POST['smsPhone'] . '@sms.myserver.com'; $to = $smsTo; $subject = $_POST['smsSubject']; $message = $_POST['smsMessage']; $headers = 'From: '. $poot . \r\n . 'Reply-To: '. $poot . \r\n; echo $to; mail($to, $subject, $message, $headers); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Try $additional = -f . $poot; mail($to, $subject, $message, $headers, $additional); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS E-Mail and other oddities
Jay Blanchard wrote: $poot = ini_set(sendmail_from, '[EMAIL PROTECTED]'); $smsTo = $_POST['smsPhone'] . '@sms.myserver.com'; $to = $smsTo; $subject = $_POST['smsSubject']; $message = $_POST['smsMessage']; $headers = 'From: '. $poot . \r\n . 'Reply-To: '. $poot . \r\n; echo $to; mail($to, $subject, $message, $headers); What platform are you on? If you're on a UNIX variant you want to use the secret 5th parameter of mail like so... $fromaddress = '[EMAIL PROTECTED]'; mail($to, $subject, $message, $headers, '-f'.$fromaddress); If you're on Windows AFAIK you're stuffed unless you use a class to send the mail directly - see phpclasses et al for that sort of thing. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SMS E-Mail and other oddities
[snip] $fromaddress = '[EMAIL PROTECTED]'; mail($to, $subject, $message, $headers, '-f'.$fromaddress); [/snip] Cool...worked like a champeene race dog! (Say it with a Southern drawl) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SMS E-Mail and other oddities
On Thu, May 11, 2006 3:16 pm, Jay Blanchard wrote: I am attempting to send SMS via an e-mail messageand it works! *phew* phonenumber@sms.myserver.com Problem is that the reply to or from field on the device always shows [EMAIL PROTECTED] regardless of what I have set the Replay-To: or From: headers. PHP runs as nobody, so this makes sensekinda'. So I tried ini_set() and regardless of that the From: is always nobody. How can I fix this? I am trying many things right now, but my stomach hurts and my eyes are buggin'...if anyone can help let me know! First: Does it work with regular email going to a regular account? Almost-for-sure it will, but let's be methodical about eliminating D'oh mistakes. Next: Is there an SMS spec somewhere with some OTHER header they want for From / Reply-to / Error-to / X-SMS-From or something? You have to put in effort on this to eliminate the possibility that you're just missing some goofy SMS header. Next: Try it with different SMS clients and devices and... Maybe it's just one SMS client/device/server -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php