View Full Version : sms mail coming from servername not domain name
11-13-2010, 11:48 PM
Hi im assuming this is my host domain setting someplace as all the var in my php are set to domain and all my var in my send mail are set to domain but here is the deal.
i have sms set up on my social site and it sends the message to the cell phone just fine, but its comming from my server name not my domain name.. any ideas where i might look..
11-13-2010, 11:53 PM
Are you using the mail command or direct SMTP communication with the MTA?
11-13-2010, 11:56 PM
im using the mail command in a php function im on a shared server.
11-14-2010, 11:16 AM
After the headers in the mail command, (the 4th parameter), add a 5th parameter, something like:
mail($from, $to, $subject, $headers, '-email@example.com -firstname.lastname@example.org')
email@example.com obviously being substituted with your own mail address...
11-14-2010, 05:11 PM
thanks matt, that seems to work, its now comming from my domain, this was something i had asked the original coder to fix a long time ago and he never did. And im so glad i took this over and am doing it myself, you know he had 17 freaken files for member email, i was like omg thats just way too much, its not that complicated lol.. i have so far condenced it down to 8 and still working on it..
Thanks so much, one quick followup, ........
it seems to be comming thru the sms as priority high, it does not really qualify as a priority high type of message, now i know that i can change the priority in the header makeup but i cant seem to find an example online of what the dif priority levels are and im assuming since i dont have priority specified at the moment that it defaults to high.. is that correct..
im assuming that 1 high 2 is important and 3 is normal
this is an example i found and im assuming i just need these two lines
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
11-14-2010, 05:26 PM
What's classifying the priority? X-* headers are non-standard, so unless the phones interpret that as meaning something, I'd leave as is. You could put X-anything-here-that-I-might-want-to-put and it means nowt unless something is looking for that header specifically. If you do want to change it, however, that second line you posted looks like the one. Just make the value a variable and set some way of assigning a priority to it.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.