• What is my issue :
    I would like to handle every emailing procedure in wordpress through gmail or any other working smtp

    What have I done so far ?
    I am given to understand that there are many plugins that can do it for you and they perfectly work with any contact form I have created inside my box , yet they do not handle any request upon new registration or even new comments , so basically , they do not have full functionality as I have installed nearly every free and trial version.

    What research and applications have I done so far ?
    Just like any other avid php learner I have looked up every available topic and source for the answer , and I realized it is possible to edit class-phpmailer.php

    What edits did I do in the php mailer and what was the end result ?
    elements edited are :
    public $From = ‘mymail@gmail.com’;
    public $FromName = ‘me’;
    public $Mailer = ‘smtp’;
    public $UseSendmailOptions = false;
    public $Host = ‘smtp.gmail.com’;
    public $Port = 465;
    public $SMTPSecure = ‘ssl’;
    public $Username = ‘mylogin’;
    public $Password = ‘mypassword’;

    with ZERO result ahead as I have received , the error ” invalid address(setFORM) ”
    meaning that the mail server does not work upon registration and surely does not work on new comments

    What am I looking for ?
    I want a tutorial or any suggestion or guidance that eventually leads me to using an external smtp into handling every single mail request in wordpress

    Thanks,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mrkhoros

    (@mrkhoros)

    Luke thank you for the swift answer , it is naive of me asking , where that function must be added exactly , is the phpmailer itself or it can also be added in wp-mail

    • This reply was modified 7 years, 1 month ago by mrkhoros.
    Moderator bcworkz

    (@bcworkz)

    Neither. You add an action hook to your own callback function. The code can either reside in a simple plugin or functions.php of a child theme. This is mainly referring to using the phpmailer_init action. If you use a class as described in the mcfarlin link, the same could apply, but a plugin is probably a better approach. There’s lots more plugin info in the Handbook my link takes you to.

    Thread Starter mrkhoros

    (@mrkhoros)

    Okay I added them to my theme function dot php , my contact forms are working , yes they do , yet no email is sent for the new comments or new registration , on the registration page I get the error invalid address(setFORM)

    Thread Starter mrkhoros

    (@mrkhoros)

    The issue is resolved , for the reference , the issue is caused by woocommerce , the snippet you have put works 100 % and it does redirect every single mail request in wordpress , now I have to look for the reason of that error why it stops me from sending email in woocommerce forums , thanks a bunch

    @mrkhoros

    Your welcome, glad I could help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘using smtp by editing wp’ is closed to new replies.