Input Process Send Email is not working


I Try to send email in input process,

  1. i configure gmail in settings.php,
  2. install Swift Mailer php latest (swiftmailer/swiftmailer:^6.0),
  3. Configure path in email.php,

But i got some error in execution time, that is in bellow,

How to resolve this error or configure any other else…

please help to solve this error…

Fatal error: Uncaught Error: Call to undefined method Swift_Message::newInstance() in /home/u885122168/public_html/iot/Lib/email.php:22 Stack trace: #0 /home/u885122168/public_html/iot/Modules/eventp/eventp_processlist.php(83): Email->__construct() #1/home/u885122168/public_html/iot/Modules/process/process_model.php(62): Eventp_ProcessList->sendEmail(‘At 2018-09-05 0…’, 1536092073, 29, Array, Object(Process)) #2/home/u885122168/public_html/iot/Modules/process/process_model.php(108): Process->__call(‘sendemail’, Array) #3 /home/u885122168/public_html/iot/Modules/input/input_methods.php(249): Process->input(1536092073, 29, ‘48:30,49:1,47:2…’, Array) #4/home/u885122168/public_html/iot/Modules/input/input_methods.php(101): InputMethods->process_node(1, 1536092073, ‘2’, Array) #5/home/u885122168/public_html/iot/Modules/input/input_controller.php(50): InputMethods->post(1) #6/home/u885122168/public_html/iot/core.php(64): input_controller() #7/home/u885122168/public_html/iot/index.php(191): controller(‘input’) #8 {main in /home/u885122168/public_html/iot/Lib/email.php on line 22

Please do not double post. I have deleted your other post as it was on the end of a “Solved” thread.
In any case, double posting only creates two possible sets of replies and confuses everyone.
Thank you.

This might be because you have installed swiftmailer v6, emoncms usually uses v5.1, possibly because you installed using composer rather than using PECL as indicated in the emoncms install guides.

I have closed your github issue containing a duplicate of the above (for the same reason as Robert gave above) and opened a new issue to discuss the move to v6 (or not) but those changes might not be a swift solution (pun intended :smile: ) so switching back to v5.1 might be the answer you need.

Hi pB66,

Thank you for reply.
I downgrade swiftmailer 6.0 to 5.1.0,

Now email is working…

Thanks lot…