ukyo Posted June 3, 2016 Posted June 3, 2016 This module extends WireMail base class, integrating the PHPMailer mailing library into ProcessWire. Module Directory - Githup repo 11
ceberlin Posted December 27, 2016 Posted December 27, 2016 There was a security alert on Christmas about PHPmailer (older than 2.5.18, latest is 2.5.19): https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html 1
ukyo Posted December 27, 2016 Author Posted December 27, 2016 I updated my module on my local works, didn't update repo yet. I will update module as soon as possible. 2
ukyo Posted December 28, 2016 Author Posted December 28, 2016 * updated : PhpMailer 5.2.19 module updated also in githup repo and module directory 1
cpx3 Posted July 21, 2017 Posted July 21, 2017 (edited) Hi there, using the PHPMailerModule I want to send an embedded image but always get the error-message that this function does not exist. When I send the message directly via PHPMailer from another website it works fine. What am I doing wrong? Thanks in advance, Bernhard Edited July 23, 2017 by kongondo moved your topic to PHPMailer Module support forum
thetuningspoon Posted August 29, 2017 Posted August 29, 2017 On 7/21/2017 at 4:37 PM, cpx3 said: Hi there, using the PHPMailerModule I want to send an embedded image but always get the error-message that this function does not exist. When I send the message directly via PHPMailer from another website it works fine. What am I doing wrong? Thanks in advance, Bernhard How are you calling WireMail? If you are using "$mail = new WireMail()" then I don't think it knows to use the WireMailPHPMailer module and will use the default WireMail() instead. Use "$mail = wireMail()" instead.
thetuningspoon Posted August 31, 2017 Posted August 31, 2017 @ukyo Is it possible to send each email individually, as with the base WireMail class? I tried the following, but it still includes all recipients in the email headers of each email that gets sent: foreach($recipients as $recipient) { $m->to(null); $m->to($recipient); $m->send(); }
ukyo Posted February 28, 2018 Author Posted February 28, 2018 PHPMailer updated to v6, Module version updated to v1.0
Sean Dinwiddie Posted May 8, 2018 Posted May 8, 2018 Parse Error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) (line 198 of /site/modules/WireMailPHPMailer/WireMailPHPMailer.module)
cstevensjr Posted May 8, 2018 Posted May 8, 2018 3 hours ago, Sean Dinwiddie said: Parse Error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) (line 198 of /site/modules/WireMailPHPMailer/WireMailPHPMailer.module) That's an error that used to be associated with PHP 5.2. What version of PHP are you running?
Sean Dinwiddie Posted May 8, 2018 Posted May 8, 2018 Running PHP version 5.6 Switched the double colon to an arrow and that fixed it for now. Would pry be overwritten when the module gets updated. Is a higher version of PHP required then?
Sean Dinwiddie Posted May 8, 2018 Posted May 8, 2018 Fatal error: Cannot redeclare class ComposerAutoloaderInita340af30ecccbbc7f2cadd9d1913dc00 in /site/assets/cache/FileCompiler/site/modules/WireMailPHPMailer/vendor/composer/autoload_real.php on line 6 Compile Error: Cannot redeclare class ComposerAutoloaderInita340af30ecccbbc7f2cadd9d1913dc00 (line 6 of /site/modules/WireMailPHPMailer/vendor/composer/autoload_real.php)
ukyo Posted May 8, 2018 Author Posted May 8, 2018 6 hours ago, Sean Dinwiddie said: Fatal error: Cannot redeclare class ComposerAutoloaderInita340af30ecccbbc7f2cadd9d1913dc00 in /site/assets/cache/FileCompiler/site/modules/WireMailPHPMailer/vendor/composer/autoload_real.php on line 6 Compile Error: Cannot redeclare class ComposerAutoloaderInita340af30ecccbbc7f2cadd9d1913dc00 (line 6 of /site/modules/WireMailPHPMailer/vendor/composer/autoload_real.php) Updated PHPMailer to 6.0.5 Module setting singular: true Module setting autoload: true v.1.0.6 PHPMailer required PHP version is >=5.5.0 https://github.com/PHPMailer/PHPMailer/blob/master/composer.json#L22 I am using module with PHP 7.2.x and 7.1.x versions with multiple sites and didn't see issue like this. I hope module update will fix your problem. 1
Sean Dinwiddie Posted May 8, 2018 Posted May 8, 2018 Very good. Will see about upgrading the PHP version. Thank you!
Crawford Tait Posted August 26, 2019 Posted August 26, 2019 I was having issues with the emails sent from formbuilder - installing your module has fixed them, but although everything works fine, I see this error on form submission: One or more errors prevented submission of the form. Please correct and try again. Unable to verify successful email delivery of this form submission. Is there a way to suppress that? Thanks!
Crawford Tait Posted September 3, 2019 Posted September 3, 2019 If anyone else comes across this, you need to change the last line of the module code to return a value: return (int) $this->PHPMailer->send(); 1
titanium Posted March 2, 2021 Posted March 2, 2021 I'm only at the beginning of my tests, but this module basically works with PHP 8. Thanks for that! I have one question: there is a setting "XMailer". The help text reads: "Options: An empty string for PHPMailer default, whitespace for none, or a string to use." How is entering the "whitespace for none" supposed to work? If you enter a space, ProcessWire removes it when saving....
froot Posted March 4, 2021 Posted March 4, 2021 I'm trying desperately to send HTML emails with WireMailPHPMailer, but It always seems to convert the markup from a CKEditor body to I think is what you call autogenerated text or alternative text. something like FLOWERS ARE RED =============== my name is NOT Dave this poem makes no sense microwave (https://en.wikipedia.org/wiki/Microwave) instead of: flowers are red my name is NOT Davethis poem makes no sensemicrowave What could it be? Thanks for help!
Jan Romero Posted March 4, 2021 Posted March 4, 2021 Can you show your code and ideally explain what all the relevant variables are?
froot Posted March 4, 2021 Posted March 4, 2021 I'm not using any custom code, just the module settings in the admin backend and the following (which is the default email template of the Promailer module) : if($input->get('type') === 'html') { ?> <!DOCTYPE html> <html> <head> <title>{subject}</title> <meta http-equiv="Content-Type" content-type="text/html; charset=UTF-8;" /> <style type='text/css'> body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 15px; } a { color: #009ADA; font-weight: bold; text-decoration: none; } a:hover, a:focus { color: #333; } </style> </head> <body> <h1><?=$page->title?></h1> <div><?=$page->body?></div> </body> </html> } else if($input->get('type') === 'text') { // Text-based email output (optional) if($input->get('preview')) header('content-type: text/plain'); echo $sanitizer->getTextTools()->markupToText(strtoupper($page->title) . "\n\n$page->body"); } else { // show preview links to our text and HTML emails ?> <html> <body> <ul> <li><a href='./?type=html&preview=1'>Preview HTML email</a></li> <li><a href='./?type=text&preview=1'>Preview TEXT-only email</a></li> <?php if($page->editable()) echo "<li><a href='$page->editUrl'>Edit this email</a></li>"; ?> </ul> </body> </html> <?php }
MSP01 Posted October 27, 2022 Posted October 27, 2022 Sending images using "$mail->AddEmbeddedImage" works well from frontend, but if I run the same code from backend the image will not appear in the email. First I thought content-type was the problem (for some reason it changes from multipart/alternative to text/html when sent from backend), but after I fixed it the problem persists. In this case I send an email based on data on a page. Email can be sent by filling a form on frontend, but also through backend by using checkbox and saving the page. Image in question is saved on another page.
JoshoB Posted March 14, 2023 Posted March 14, 2023 Still working on my CRM... I need to send emails with attachment. I am using the WireMailPHPMailer module. Everything seems to work fine, but sending an attachment doesn't work. The attachments are selected on the form from pages. Each of those page features a file field (called just "file") with a file, usually a PDF. In the e-mail form, I enter the sender, the addressee, the subject, the message, and then I select, from a dropdown, the attachment I want to attach to this message. However, clicking "send" will send the e-mail, but without an attachment. I think this code will make it more clear ($formAttachment is the ID that gets sent as a $_GET variable when the form is submitted, and "file" is the field that contains the selected file in question): $file = $pages->get("id=$formAttachment")->file; $mail->addAttachment($file->path, $file->name); Going step by step through the code, the error ProcessWire throws up is "Could not access file". I have been banging my head against this now for a week, so I am hoping that someone here can have a look and say, "Oh hey, you need to do this and it's fine." I am pretty sure it has to do with either permissions in the file structure (this is a file that gets upload to /assets/ for the page in question), or that my understanding of ProcessWire's "path" is completely off. Either way, any help would be greatly appreciated!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now