Greetings Trongate Community!
Followed the video in mod market and getting this error:
Mailer Error: error_log
Warning: Cannot modify header information - headers already sent by (output started at /home/finsgllc/public_html/modules/mailman/controllers/Mailman.php:827) in /home/finsgllc/public_html/engine/tg_helpers/url_helper.php on line 78
Tried following this thread (https://trongate.io/help_bar_threads/display/yH7EbBBrGSwk59jw)
Did more research and found this
(https://trongate.io/help_bar_threads/display/5dqYteUUBb7GWsmb)
Where "Tonygreen" states "I did manage to get the phpMailer library working by removing the namespace references and "requiring" the classes "
But I dont know what this means, so I am learning about namespaces now to try "Tonygreen"s fix. I also am learning about postman and checking headers. Any suggestions? or better questions I should be asking?
installing php mailer
2 years ago
2 years ago
#1
2 years ago
#2
Hi Fin,
If Dan doesn't step in, I'll post a solution in the next day or so.
If Dan doesn't step in, I'll post a solution in the next day or so.
2 years ago
#3
Hi Fin,
Sorry for my slow response - it has been a rather busy week for me doing my day job.
I see Dan hasn't responded, he might be busy too.
OK... I've had a look at this and see a few issues with the Mailman module.
1. once you install both the 'Simple Members' module and Dan's 'Mailman' module you have to set up a few things, which you have most likely done, but let me make things clear if you or others have deviated:
• In the 'Mailman' module add your email credentials to the '_send_my_email()' function: • In the 'Members' module add the following to:NOTE: Dan's README.md has the wrong module name in the 'Members' module setup so use the above one and don't forget to add the missing semicolon Dan missed in it too • If you followed the above it should all just work
• If you followed Dan's video tutorial, and changed this to trueYou will see a whole bunch of debug info on your screen and if you have warnings set to true in you PHP setup you will also see the following warning you reported above:NOTE - I am seeing a different line number that you (251 in SMTP.php) where you are seeing it in 'Mailman.php' at line 827... I think there might be some missing code when Dan stripped PHPMailer down and also referenced the 'mailer' instead of 'mailman' on the redirects. It's up to you to try to find these, but for me, I'd stick to installing PHPMailer from my previous post (https://trongate.io/help_bar_threads/display/e94SHS7RnyaE7qe6) as it has been updated since Dan's Mailman which uses '6.5.3' and now it's current version is '6.9.1' and then create an emailer function that can pass $data[] array as Dan had done or wait for Dan to release fixes to the 'Mailman' module.
Sorry for my slow response - it has been a rather busy week for me doing my day job.
I see Dan hasn't responded, he might be busy too.
OK... I've had a look at this and see a few issues with the Mailman module.
1. once you install both the 'Simple Members' module and Dan's 'Mailman' module you have to set up a few things, which you have most likely done, but let me make things clear if you or others have deviated:
• In the 'Mailman' module add your email credentials to the '_send_my_email()' function: • In the 'Members' module add the following to:NOTE: Dan's README.md has the wrong module name in the 'Members' module setup so use the above one and don't forget to add the missing semicolon Dan missed in it too • If you followed the above it should all just work
• If you followed Dan's video tutorial, and changed this to trueYou will see a whole bunch of debug info on your screen and if you have warnings set to true in you PHP setup you will also see the following warning you reported above:NOTE - I am seeing a different line number that you (251 in SMTP.php) where you are seeing it in 'Mailman.php' at line 827... I think there might be some missing code when Dan stripped PHPMailer down and also referenced the 'mailer' instead of 'mailman' on the redirects. It's up to you to try to find these, but for me, I'd stick to installing PHPMailer from my previous post (https://trongate.io/help_bar_threads/display/e94SHS7RnyaE7qe6) as it has been updated since Dan's Mailman which uses '6.5.3' and now it's current version is '6.9.1' and then create an emailer function that can pass $data[] array as Dan had done or wait for Dan to release fixes to the 'Mailman' module.
2 years ago
#4
Ok, took a couple days but I got rid of mailman and got a fresh PHPMailer working with the Members Module. No header issue. but I got cannot connect to smtp issue.
I have used Composer to install PHPMailer in Vendor folder and have not moved it to assets in my "basemodule" as suggested by Tonygreen but left it where installed by composer.
This line in the _send_my_email() method in my mail module is the culprit and needs to be commented out to get rid of connect error
It was hinted at when Dan said he didnt include smtp in the mailman module I think.
Along with this at the top of my php file to import classes as per dafas recommendation (https://trongate.io/help_bar_threads/display/5dqYteUUBb7GWsmb) members is working now with PHPMailer like butter!
I am working with CentoOS on a hostgator vps
Thank you Trongate Community for all the guidance!
I have used Composer to install PHPMailer in Vendor folder and have not moved it to assets in my "basemodule" as suggested by Tonygreen but left it where installed by composer.
This line in the _send_my_email() method in my mail module is the culprit and needs to be commented out to get rid of connect error
It was hinted at when Dan said he didnt include smtp in the mailman module I think.
Along with this at the top of my php file to import classes as per dafas recommendation (https://trongate.io/help_bar_threads/display/5dqYteUUBb7GWsmb) members is working now with PHPMailer like butter!
I am working with CentoOS on a hostgator vps
Thank you Trongate Community for all the guidance!