Jump to content

WireMailPHPMailer


ukyo
 Share

Recommended Posts

  • 6 months later...
  • 4 weeks later...
  • 1 month later...
  • 3 months later...

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 by kongondo
moved your topic to PHPMailer Module support forum
Link to comment
Share on other sites

  • 1 month later...
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.

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...
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?

Link to comment
Share on other sites

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) 

Link to comment
Share on other sites

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.

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

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!

 

Link to comment
Share on other sites

  • 1 year later...

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....

Link to comment
Share on other sites

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 Dave
this poem makes no sense
microwave

 

What could it be? Thanks for help!

Link to comment
Share on other sites

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

} 

 

Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

  • 4 months later...

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! 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...