Get the most out of your Centmin Mod LEMP stack
Become a Member

Wordpress How can i change the sender email for Wordpress WP-CLI Auto Update notifications

Discussion in 'Blogs & CMS usage' started by pamamolf, Aug 28, 2016.

  1. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    7:10 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi

    How can i change the sender email for Wordpress WP-CLI Auto Update notifications?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,195
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    2:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Aug 28, 2016
  3. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    7:10 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Just replacing the existing line 3 there:

    Code:
    EMAIL=current@gmail.com
    will not do the trick?
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,195
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    2:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    yes if you want from and to address to be the same
     
  5. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    7:10 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    I want to change only from :)
     
  6. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    7:10 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    So i must change :

    Code:
    mail -r $EMAIL -s "Wordpress
    to:

    Code:
    mail -r newemail@domain.com -s "Wordpress
    ?

    or i can add a second variable like EMAIL2 and use it there $EMAIL2 ?
    But i don't want to mess your code :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,195
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    2:10 PM
    Nginx 1.13.x
    MariaDB 5.5
  8. eva2000

    eva2000 Administrator Staff Member

    30,195
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    2:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    yes you can
     
  9. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    7:10 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Damn confused and bad english all together now :)

    So which one is correct?

    Code:
    mail -r newemail@domain.com -s "Wordpress
    or

    Code:
    mail -r $email_from -s "Wordpress
    and adjust the email_from = root@localhost ?

    or

    Add a second variable like EMAIL2 and use it there $EMAIL2 ?
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,195
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    2:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    EMAIL=toemail
    EMAIL2=fromemail
    Code (Text):
    mail -r $EMAIL2 -s "Wordpress WP-CLI Auto Update $(date)" $EMAIL
     
    • Informative Informative x 1
  11. pamamolf

    pamamolf Well-Known Member

    2,726
    243
    63
    May 31, 2014
    Ratings:
    +434
    Local Time:
    7:10 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    It will be good to have it on Centminmod also as default with two variables :)

    A lot more easy :)

    I just did this:

    Code:
    EMAILTO=myemail@gmail.com
    EMAILFROM=serveremail@domain.com
    
    and

    Code:
    mail -r $EMAILFROM -s "Wordpress WP-CLI Auto Update $(date)" $EMAILTO
     
    Last edited: Aug 28, 2016
    • Like Like x 2
  12. eva2000

    eva2000 Administrator Staff Member

    30,195
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    2:10 PM
    Nginx 1.13.x
    MariaDB 5.5
    done :)
     
    • Like Like x 2