Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,383
    Thanks
    264
    Thanked 32 Times in 31 Posts

    sms mail coming from servername not domain name

    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..

  • #2
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Are you using the mail command or direct SMTP communication with the MTA?

  • #3
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,383
    Thanks
    264
    Thanked 32 Times in 31 Posts
    im using the mail command in a php function im on a shared server.

  • #4
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    After the headers in the mail command, (the 4th parameter), add a 5th parameter, something like:

    Code:
    mail($from, $to, $subject, $headers, '-fmail@example.org -rmail@example.org')
    mail@example.org obviously being substituted with your own mail address...

  • #5
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,383
    Thanks
    264
    Thanked 32 Times in 31 Posts
    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

    Code:
    $headers .= "X-Mailer: PHP\n"; // mailer
    $headers .= "X-Priority: 1\n"; // Urgent message!

  • #6
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •