horst

WireMailSmtp

Recommended Posts

ethanbeyer    44
2 hours ago, Sonia Margollé said:

I use OVH 

The site is on for more than a year now,  I had a lot of "Error in hnsmtp::send : cannot connect to smtp-server!"  
even if I never change module configuration and if I check it's ok. And now the recipients ...

All the emails that I send using the module it's only to 1 recipients and sometimes another on in copy.

Check this out:

http://docs.mailpoet.com/article/49-lists-of-hosts-and-their-sending-limits

 

For OVH:

591f10824f724_ScreenShot2017-05-19at11_33_18.thumb.png.b068c9e4bb22c4e28fe4178a05a8dd6e.png

 

Most likely because of bounces, your site is unable to send emails.

A couple of things you can do:

1. Contact OVH and ask them to give you some idea of what your email's standing is.

2. Use a service like Sendgrid (sendgrid.com) as an off-site SMTP delivery service. If I remember correctly, Sendgrid is free up to 12,000 emails a day.

 

Hope this helps!

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I will check that !

I try to put some log in the module and I was able to have a more detailed error message, I think

"554 5.7.1 <---->: Recipient address rejected: You have exceeded the limit of 400 messages per hour and per IP address. Please, re-try later."

What I don't understand is how that can be, never 400 messages are send via the website, and not 20 per hour to.  Oo
If I wait like 30 seconds, it's ok again.  And the emails are good, the clients can send emails directly without problems. 

Knowing it's a shared hosting, is it possible that other peoples on the server are blocking everyone ? 

  • Like 1

Share this post


Link to post
Share on other sites
ethanbeyer    44
3 minutes ago, Sonia Margollé said:

"554 5.7.1 <---->: Recipient address rejected: You have exceeded the limit of 400 messages per hour and per IP address. Please, re-try later."

Knowing it's a shared hosting, is it possible that other peoples on the server are blocking everyone ? 

If it's shared hosting and all of the sites on your IP are potentially sending emails, that is almost certainly your problem.

Again, I'd look into an email delivery service like Sendgrid, Mandrill or even TurboSMTP - these will help with deliverability, and you won't be competing with other sites on the same IP to get emails out.

  • Like 2

Share this post


Link to post
Share on other sites
rick    329

I'm not knocking sendgrid, or any other email service. After working in the adult industry (I know, don't judge me. I was young and needed the money :) ), I am not too fond of services that want a 'contacts list' stored at their site. You may want to consider gmail, or the like, for sending small quantities of emails. If you need an email company domain, eg, yourname@yourdomain.com, then they will provide that for a small monthly fee, usually $5 or so. I have never exceeded gmail's limit, and it is far better than trying to run your own email server.

Also, the majority of my applications require subscribers to use their company email address. I have the company create a site admin email address on behalf of the application, which eliminates the need for any third-party solutions.

If you need the capacity of those email services, then by all means use them. They handle that particular need well. Just be cautious of how they treat your contacts, if they require it.

Another possibility is to move to a VPS hosting account that has an email feature. That way you are the only user that they audit to affect any email limitations.

 

  • Like 1

Share this post


Link to post
Share on other sites

I have a little problem:

I installed the plugin, set up my form submit PHP file and when I do a connection check - everything is ok! There is no error at all.

When sending the mail it is logged and everything seems fine. Except one thing: The message is never delivered!

Of course I tried to look into the spam folder - but no. The email just seems to disappear when hitting the submit button.

To make sure that my server is running correctly i tried the native mail() PHP method with the form - that is working!

 

So what might be the error in this case? Any ideas?

 

Share this post


Link to post
Share on other sites
15 hours ago, cstevensjr said:

Make sure you are at least testing sending from one mail provider to another.

Here are two links that may help you:

http://kb.mailchimp.com/delivery/spam-filters/im-not-receiving-my-test-campaigns

https://productforums.google.com/forum/#!topic/gmail/HB31aN_GR_8

 

Sending e-mails from one acccount to another works fine. I just can't get wiremail to do it. I even tried it with different mail accounts.

Share this post


Link to post
Share on other sites
cstevensjr    1,370

If possible, What domain where you sending from and to what domain where you sending to in your test emails?  Are these accounts/SMTP Service associated with Your Hosting Provider, Gmail, Microsoft or any other third-party email provider?

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, cstevensjr said:

If possible, What domain where you sending from and to what domain where you sending to in your test emails?  Are these accounts/SMTP Service associated with Your Hosting Provider, Gmail, Microsoft or any other third-party email provider?

I tried both. Sending from mail accounts of my hosting provider to the same accounts. Or third party mail providers. Nothing gets delivered. I think I'll ask the support of my hosting provider.

Share this post


Link to post
Share on other sites
horst    3,960

You should try to uninstall WireMailSMTP and try sending with native WireMail. This should work, as it uses the PHP mail() function.

If WireMail works, and WireMailSMTP don't, it might be firewall restricted by your hosters settings. Native PHP mail function is controlled and allowed by your hoster, other (foreign) connections (other IPs or only Ports) maybe blocked by firewall settings of your hoster. (?)

  • Like 3

Share this post


Link to post
Share on other sites
23 hours ago, horst said:

You should try to uninstall WireMailSMTP and try sending with native WireMail. This should work, as it uses the PHP mail() function.

If WireMail works, and WireMailSMTP don't, it might be firewall restricted by your hosters settings. Native PHP mail function is controlled and allowed by your hoster, other (foreign) connections (other IPs or only Ports) maybe blocked by firewall settings of your hoster. (?)

That's good point to start with!

I have already contacted my provider becaouse I think there could be a firewall issue, too. Otherwise I have no explanation for this.

However, I will definetly test out the native WireMail variant.

Share this post


Link to post
Share on other sites

Problem solved.

My bad. In my source code I had commented out the following line:

$numSent = $mail->send();

That was the case because a little time ago when I was developing the submit form, I must have tried to test something. 

What made me so confused was the fact that the activity log still said "mail send" so I never looked into this part of the code again.

Now that's a really stupid thing, sorry that I bothered you with it. 

 

  • Like 2

Share this post


Link to post
Share on other sites
Barry    18

I've installed WireMailSmtp on my locally hosted ProcessWire site v 3.0.62 and filled in my sendgrid data and get a WireMailSmtpConfig: SUCCESS! upon testing

When I try the following:

if($mail->className != 'WireMailSmtp') {
    echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>";
}

I get "Couldn't get the right WireMail-Module (WireMailSmtp). found: WireMail"

How do I get the wiremail function to make use of the WireMailSMTP addon?

Share this post


Link to post
Share on other sites
horst    3,960

Interesting would be how you have initialized $mail?

Share this post


Link to post
Share on other sites
hellomoto    36

In PW 3.0.42 when editing a user this error appears up top:

Quote

Strict Standards: Declaration of WireMailSmtp::attachment() should be compatible with ProcessWire\WireMail::attachment($value, $filename = '') in /Applications/AMPPS/www/catco/site/assets/cache/FileCompiler/site/modules/WireMailSmtp-master/WireMailSmtp.module on line 22

 

Share this post


Link to post
Share on other sites
chrizz    33
On 3.9.2017 at 2:46 AM, hellomoto said:

In PW 3.0.42 when editing a user this error appears up top:

 

@hellomoto I couldn't reproduce this. Which version of WireMailSmtp you're using? I am on the same PW version but I am currently struggeling with the HTML signature. 

 

Using this code, triplechecked that at HTML signature is stored in the WireMailSmtp settings, but - and thats the fun fact - it does not work within a HTML mail - but the signature is added to the plaintext. 

		$mail = wireMail();
		$mail->from($email, $name);
		$mail->to("me@me.com", "Me");
		$mail->subject('new message - '.$config->httpHost);
		//$mail->addSignature(true); ==> has no effect either since I chose "send signature with _every_ message" in the module settings
		$mail->bodyHTML($message);
		$mail->send();

 

Has this happened to anyone before? And if so: how did you solve this?

Share this post


Link to post
Share on other sites
horst    3,960

@chrizz can you confirm that your html-message doesn't contain a body endtag?

</body>

If this is the case, you can update the module to the new version 0.2.5, where this is fixed.

Share this post


Link to post
Share on other sites
chrizz    33

@horst it doesn't have any tags (except the tags I am adding to the message manually).

I tried a downgrade to 0.2.3 => no success - same problems

I just installed version 0.2.5 => still no tags but the signature is there... 

this is what the mail content looks like (headers are removed)

--3e089748ac63f63eedf33dc907a71870
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

hallo

--
PLAIN blablabla
--3e089748ac63f63eedf33dc907a71870
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<strong>hallo</strong>

HTML <br><br><strong>blablabla</strong>
--3e089748ac63f63eedf33dc907a71870--

so it seems as if my problem has been solved - but it's still somehow weird that there are not tags... If you want me to share more details and/or sources please let me know. Would be glad if I can help you :) 

Thanks for providing this module & the support!

 

 

Share this post


Link to post
Share on other sites
horst    3,960

@chrizz my question was, if you used <head></head><body></body> tags in your HTML-message.

Now I know, you don't. :)

That was the reason why the Signature wasn't attached to the HTML-message-part.
https://github.com/horst-n/WireMailSmtp/blob/532dd94752597a4b2b9f3a2c02ef48b21db77f84/WireMailSmtpAdaptor.php#L280-L285

With the modules update to version 0.2.5, the html-signature get added in both cases.

  • Like 2

Share this post


Link to post
Share on other sites
chrizz    33

hehe... fair enough to check for a closing tag ;) 

Next time I'll promise I'll use correct markup which would have solved the problem right away. Thanks for your support :)

 

  • Like 1

Share this post


Link to post
Share on other sites
videokid    44

Hi,

WireMailSMTP was working fine, but somehow it stops, now all I get it this:

ERROR: SMTP settings did not work.
could not start TLS connection encryption protocol

tried with google and yandex, same error....

 

Regards,

Share this post


Link to post
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


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By kongondo
      The Module Blog for ProcessWire replicates and extends the popular Blog Profile.
      Blog is now in version 2.
      Please read the README in the Github link below in its entirety before using this module 
      Blog Documentation is here (Work in Progress!)
      See this post for new features in version 2 or the readme in GitHub.
      To upgrade from version 1, see these instructions.
      ##################################################
      Most of the text below refers to Blog version 1 (left here for posterity). 
       
      Blog version 1 consists of two modules:
      ProcessBlog: Manage Blog in the backend/Admin.
      MarkupBlog: Display Blog in the frontend.
      Being a module, Blog can be installed in both fresh and existing sites. Note, however, that presently, ProcessBlog is not compatible with existing installs of the Blog Profile. This is because of various structural and naming differences in respect of Fields, Templates, Template Files and Pages. If there is demand for such compatibility, I will code a separate version for managing Blog Profile installs.
      In order to use the 'Recent Tweets Widget', you will need to separately install and setup the module 'MarkupTwitterFeed'.
      Please read the README in the Github link below in its entirety before using this module (especially the bit about the Pages, etc. created by the module). 
      I'll appreciate Beta testers, thanks! Stable release works fine.
      Download
      Modules Directory: http://modules.processwire.com/modules/process-blog/
      Github: https://github.com/kongondo/Blog
      You can also install from right within your ProcessWire install.
      Screenshots (Blog version 1)

      Video Demos
      ProcessBlog
      MarkupBlog
      Credits
      Ryan Cramer
      The Alpha Testers and 'Critics' 
      License
      GPL2
    • By bernhard
      hi everybody,
      this is a preview of a module that i'm working on for quite a long time. I needed it for an intranet office management application that i'm still working on. It makes it very easy to create very customized Datatables using the awesome jquery datatables plugin (www.datatables.net)
       
      EARLY ALPHA release!
      It's very likely that there will lots of changes to this module that may cause breaking your implementations.
       
      Module source
      sorry, removed as it changes too frequently; closed alpha - contact me if you think you can contribute
       
       
      Remarks:
      The module is intended to be used on the backend. Loading styles is at the moment only done via adding files to the $config->styles/scripts arrays. Also the communicaton to javascript is done via the $config->js() method that is built into the admin and would have to be implemented manually on frontend use. But it would not be difficult of course
      Installation:
      Nothing special here, just download + install
       
      edit: removed some parts, because i made a complete rewrite of the module! (see last posting in the thread)
       
      Customization example:
      in the screencast you see an example that i'm using in a process module. i put the table inside an InputfieldMarkup just to have the same look&feel all around the admin. you see that you could also use this module to create tables quickly and easily using @kongondo s runtime markup module.
      complete PHP code:
      $this->headline('Kundenliste'); $form = $modules->get('InputfieldForm'); // init datatables module $dt2 = $modules->get('RockDataTables2'); // setup columns // name $col = new dtCol(); $col->name = 'name'; $col->title = 'Name'; $col->data = function($page) { return $page->title; }; $dt2->cols->add($col); // type $col = new dtCol(); $col->name = 'type'; $col->data = function($page) { return $page->rockcontact_type->title; }; $dt2->cols->add($col); // modified $col = new dtCol(); $col->name = 'modified'; $col->data = function($page) { $obj = new stdClass(); $obj->timestamp = $page->modified; $obj->display = date('d.m.Y', $page->modified); return $obj; }; $dt2->cols->add($col); // setup table $dt2->id = 'dt_kundenliste'; $dt2->js('/site/modules/ProcessRockProjects/dt_kundenliste.js'); $f = $modules->get('InputfieldMarkup'); $f->value = $dt2->render(); $form->add($f); // ################################## // ajax request -> return data // non-ajax -> render form + table // ################################## if($config->ajax) { echo $dt2->getJSON($pages->find('template=rockcontact, sort=random, limit=10000')); die(); } else $out .= $form->render(); return $out; what is interesting here is this part:
      // modified $col = new dtCol(); $col->name = 'modified'; $col->data = function($page) { $obj = new stdClass(); $obj->timestamp = $page->modified; $obj->display = date('d.m.Y', $page->modified); return $obj; }; $dt2->cols->add($col); datatables support orthogonal data (https://datatables.net/extensions/buttons/examples/html5/outputFormat-orthogonal.html). a date column is a good example, because you need to DISPLAY a formatted date (like 10.02.2017) but you need to be able to SORT this column by a different value (timestamp). its very easy to accomplish this by providing both values in your json. Btw: You could also just transfer the timestamp and do the formatting on the client-side via javascript. Next Example will show ho this would work. Both cases can be necessary, it's just an example here.
      [...] removed
      Why i created this module:
      of course i know @Soma s module but i needed a lot more features and the newer datatables version. also i like to define all the columns as objects and have everything on one place. lister & markupadmindatatable: nice for basic tables but lacks of features to modify the appearance of the cell values (like rendering icons, background colors and so on) datatables provides a great frontend API for filtering, showing/hiding columns, getting data, modifying it... it also plays well together with frontend charts like google chart api in this case:
       
      todo / roadmap:
      all kinds of column filters (like seen in the example above that shows an older and bloated version of this module) support for ajax filters and pagination (currently all filtering and sorting is done on the client side. i tried it with up to 50.000 rows and got reasonable results. initial loading took around 10sec. but of course this heavily depends on the complexity of your table and your data.  
       
       
    • By Robin S
      PageListTrash
      Allows non-superusers to trash pages directly from Page List (if they have page-delete permission for that page).
      Not much to say really - the module adds a "Trash" option to the extra actions for pages in Page List. It looks and works just like the Trash action available to superusers.

      https://github.com/Toutouwai/PageListTrash/
       
      Up to you whether you think non-superusers should be trusted with simpler trashing. For most cases I like the default behaviour where editors have to jump through some more hoops - I want them to think carefully about what they are doing. But if an editor needs to trash several pages then this module might reduce frustration.
      @tpr, by now you can probably predict what I'm going to say...
      ...something to merge into AdminOnSteroids?
    • By celfred
      Hello,
      I'm desperately trying to update my website to PW 3.0.62 and I'm facing issues to to module compatibility. I was stuck with Pages2Pdf which I managed to solve bu updating the module from Github, but now it's the Pages Web Service module... and this time, I don't know wht to do
      The Module is found there. But it is quite old and I can't find it in the modules catalogue... and my site is making quite a use of it (I can't think of a way to do otherwise, sorry...)
      After adding the FileCompiler=0 to the module pages, the error I'm stuck with is :
      Fatal error: Class 'WireData' not found in /home/celfred/PlanetAlert/site/modules/ServicePages/ServicePages.module on line 22
      and I have no idea on what to do... I must admit I'm not a programmer but a middle-school teacher... (for your information, here's the site I'm talking about : http://planetalert.tuxfamily.org ) but I'm struggling hard to solve the different issues I have to face and I'm wlling to understand things. I have just spent many hours trying to make 2.8 work on my localhost (and it seems ok ) but I'd like to switch to 3.x to prepare the future
      If anyone had the will to spend a few minutes to try and help me, I would greatly appreciate.
      Thanks in advance !
      If you need more information to understand my problem, feel free to ask.
    • By dimitrios
      Hello,
      I have created a module that, given a Facebook app ID and secret, posts on Facebook on behalf of a user profile or page after a PW page is saved.
      This module is configurable as follows:
      Templates: posts can take place only for pages with the defined templates On/Off switch: specify a checkbox field that will not allow the post if checked Specify a message and/or an image for the post
      Usage
      edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, a token is kept.
       
      Download
      PW module directory: http://modules.processwire.com/modules/auto-fb-post/ Github: https://github.com/kastrind/AutoFbPost   Note: Facebook SDK for PHP is used.