WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: SMS Text Message] "from" address not changing (7 posts)

  1. Lisa Q
    Member
    Posted 6 years ago #

    I entered a different email address on the options page, but when I send out a text, it's coming from databaselogin@databaseaddress.net
    Given that I don't really want everyone having that information on their phones, any suggestions?

    PS This is a really great plugin! I wish I had a email list that was so easy to manage!

  2. Michael Torbert
    WordPress Virtuoso
    Posted 6 years ago #

    The plugin attempts to send the text message with the address you entered as the sender, however, some servers have different settings, sending the default server address instead. If you don't own the server, there's not much you can do.

  3. Lisa Q
    Member
    Posted 6 years ago #

    I was afraid you'd say that... thanks!!

  4. Lisa Q
    Member
    Posted 6 years ago #

    ....and so I called Godaddy and asked them to change it. They said they would if they could but they said it's part of the configuration of WordPress and not the server settings, but if I can specifically tell them what they need to do, then to call back and they'll fix it.

    *baffled*

  5. Michael Torbert
    WordPress Virtuoso
    Posted 6 years ago #

    It has nothing to do with WordPress. It's in the configuration of the mail server that your host uses. The tech support person that you talked to isn't a systems administrator so they don't know, they just passed the buck to WP.

  6. Lisa Q
    Member
    Posted 6 years ago #

    Well, the person I talked to didn't know so they asked someone else, but who knows who that was or their expertise; you're probably right.

    Anyway, my friend found a way to work around this:
    we changed

    if (mail($to, $subject, $body, $headers)) {

    to

    $more_header = "-f xxxx@gmail.com";
    if (mail($to, $subject, $body, $headers, $more_header)) {

    and it works now! It's not ideal, obviously, but the desired results were achieved.

  7. chluper
    Member
    Posted 5 years ago #

    Instead of that, I adjusted the code the following way. Then you from is dynamically generated from the plugin options.

    Basically, it is a slight change to the mrt_all_from variable and then using you "-f address" trick.

    $mrt_all_from = "-f". get_option( "mrt_sms_from" );
    
    $body = $_POST['message'];
    $subject = $_POST['subject'];
    $to = $sendnum . $carsuf;
    $headers = 'From: ' . $mrt_all_from . "\r\n" .
        'Reply-To: ' . $mrt_all_from . "\r\n" .
        'X-Mailer: PHP/';
    
    if (mail($to, $subject, $body, $headers, $mrt_all_from)) {

Topic Closed

This topic has been closed to new replies.

About this Topic