The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mail function with smtp auth

Discussion in 'E-mail Discussions' started by AirHost, Jan 26, 2013.

  1. AirHost

    AirHost Member

    Joined:
    Jan 26, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    Need help. I've googled and search this forum a lot and I didn't find the answer. How can I configure that PHP mail function to work only with SMTP AUTH?
    Installed PEAR modules: Mail, Net_SMTP, Net_Socket, Auth_SASL & Auth_SASL2.
    PHP.ini SMTP PORT 465/26
    Restarted Apache, exim

    Still doesn't work. How m I testing to see if it's working or not? I got a contact form (wordpress plugin) and it's still sending mails.

    Please help :(
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are you using the full email address for username in your plugin settings?
     
  3. AirHost

    AirHost Member

    Joined:
    Jan 26, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    No. The plugin doesn't know to use smtp. it still sends with the mail function.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Does the plugin have a settings page? Does this plugin have a name?


    Thanks
     
  5. AirHost

    AirHost Member

    Joined:
    Jan 26, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    yes. contact form 7.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might want to have a look at their support forums:
    /http://wordpress.org/support/plugin/contact-form-7


    The only flexible thing I see about that plugin is how to use it, not how it works. It's simple, as it says it is. basic.

    Instead of installing all kinds of things you probably didn't have to, you might look around for a more complete contact form plugin.
     
  7. AirHost

    AirHost Member

    Joined:
    Jan 26, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    You missunderstood what i want to do. Let me repeat : I want all mails (web forms)sent via MAIL function to be sent WITH smtp account. It doesn't matter what plugin my customers use. MAIL function must work only with SMTP by default.
     
  8. jakesully

    jakesully Well-Known Member

    Joined:
    Nov 9, 2011
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    what infopro meant is that you should ask the guy who made the plugin how to get it to use SMTP method and not PHP mail function instead of asking cpanel team here since wordpress is a 3rdparty and cpanel team here dont give support to 3rdparty stuff.

    Because what mather is mostley how script is coded what function it wants to use so i guess person who made contact form 7 plugin for wordpress must of coded php mail function instead of smtp auth function so thats the reason why infopro told you to contact coder about it and ask him if he could add a SMTP auth feature so you can use that into script since you cannot do SMTP auth only on cpanel/whm just to get script to use SMTP, thats more up to how plugin is coded and nothing todo with cpanel/whm.
     
    #8 jakesully, Jan 29, 2013
    Last edited: Jan 29, 2013
  9. AirHost

    AirHost Member

    Joined:
    Jan 26, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I know how to make that plugin to work with SMTP. that's not the case here. let me clear it your you: MAIL php function must work with smtp. I want the plugin(or any contact forms plugins) (as it is) to DO NOT WORK without SMTP.
     
  10. jakesully

    jakesully Well-Known Member

    Joined:
    Nov 9, 2011
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    um well it doesent use SMTP by default it executes a .exe file or w.e file it has for linux instead of login in to SMTP mail server and then sends a mail.

    easyiest way is todo like this create a e-mail account to w.e you want like noreply@domain.com or so that you want it then that login details on your script and assign your domain as your SMTP server :)

    Note: I have just checked and it sems it was correct it uses a file called /usr/sbin/sendmail so every time a php script executes php mail it will then tell php to execute sendmail file with content the script tells it to send as mail.
     
    #10 jakesully, Jan 29, 2013
    Last edited: Jan 29, 2013
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sorry, for the confusion. I hope this doesn't add to it.

    In WHM » Service Configuration » PHP Configuration Editor, Advanced Editor, find:
    Add to your existing list here: mail

    Save, Restart Apache.

    That might be useful to you. GL!
     
  12. AirHost

    AirHost Member

    Joined:
    Jan 26, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    It can be done. That's why I posted here, so maybe i can get some help. Well, that's why I installed PEAR modules, so that php doens't use the sendmail by his own and send mails without SMTP authentification.
     
  13. AirHost

    AirHost Member

    Joined:
    Jan 26, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yap. Now it WORKS! Million thanks!
     
  14. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You're certainly welcome. :)
     
Loading...

Share This Page