Mailte Posted December 11, 2017 Share Posted December 11, 2017 Hi @horst, thank you so much sir! Now its working perfectly 2 Link to comment Share on other sites More sharing options...
nikoka Posted January 31, 2018 Share Posted January 31, 2018 Hi there! Struggling to get this to work with Office365 and TLS, has anyone succeeded with this? I've tried different combinations, but all I get is "ERROR: SMTP settings did not work." and "could not start TLS connection encryption protocol". Anything I could try? Thanks! Link to comment Share on other sites More sharing options...
flydev Posted January 31, 2018 Share Posted January 31, 2018 Hi @nikoka I was struggling with an other Microsoft service yesterday and make me think that your issue is with your entered information. Try : SMTP port: 587 SMTP user: yourmail@provider.com Check START-SSL Uncheck use SSL 1 Link to comment Share on other sites More sharing options...
nikoka Posted January 31, 2018 Share Posted January 31, 2018 Thanks @flydev, Tried with those, in addition with the SMTP server: smtp.office365.com, but no luck there. Link to comment Share on other sites More sharing options...
flydev Posted January 31, 2018 Share Posted January 31, 2018 (edited) I just tested with an Office365 account with these settings, it works well. WireMailSMTP 0.3.0 here. Look like its your credentials that are incorrect ? Double check Edited January 31, 2018 by flydev config screen + WMS version 2 Link to comment Share on other sites More sharing options...
Klenkes Posted February 5, 2018 Share Posted February 5, 2018 Emailaddresses in CC array keep being encoded I have a small module with a function that sends emails to me(Admin) and users who act as moderators. What I want to do is basically this:(from first post here) $options = array( 'sendSingle' => true, 'cc' => array('person1@example.com', 'person2@example.com', 'person3@example.com') ); $numSent = wireMail($to, '', $subject, $textBody, $options); But I want to CC to users of a certain role, and retrieve the users like that: $address_rev = wire('users')->find("roles=revisor"); Now I have to build the array for the $options: foreach($address_rev as $one){ $emailcc .= "'" . $one->email . "',"; } $emailcc = rtrim($emailcc, ',');// remove the last comma $options = array( 'sendSingle' => true, 'cc' => array("$emailcc") ); But sending fails with the quotes being encoded by PWs sanitizer(I assume)Invalid email address ('person1@example.com', 'person2@example.com') (in path_to....\wire\core\WireMail.php line 105)Why? It doesn't happen when I hardcode the array like in the example, and when I echo my array it looks just fine. How do I build the array to populate the cc array? Or what am I doing wrong? PW 3.0.84 WireMailSMTP 0.2.3 Link to comment Share on other sites More sharing options...
horst Posted February 5, 2018 Author Share Posted February 5, 2018 24 minutes ago, Klenkes said: But sending fails with the quotes being encoded by PWs sanitizer(I assume)Invalid email address ('person1@example.com', 'person2@example.com') (in path_to....\wire\core\WireMail.php line 105)Why? Maybe you better should collect an array, and leave it as is? $address_rev = wire('users')->find("roles=revisor"); $emailcc = array(); foreach($address_rev as $one){ $emailcc[] = one->email } $options = array( 'sendSingle' => true, 'cc' => $emailcc ); 2 Link to comment Share on other sites More sharing options...
Klenkes Posted February 5, 2018 Share Posted February 5, 2018 You are the man! Tomaten auf den Augen! Is there an english expression for it? Link to comment Share on other sites More sharing options...
titanium Posted February 6, 2018 Share Posted February 6, 2018 Is there a property to set a "Return-Path:" which differentiates from the "From:" setting? At a first glance, I have found a method call $this->emailMessage->SetHeader('Return-Path', $address); inside WireMailSmtpAdaptor.php - I guess this can't be overridden individually? Link to comment Share on other sites More sharing options...
horst Posted February 6, 2018 Author Share Posted February 6, 2018 You can set a reply-to emailaddress in the config screen. If this isn't what you are after, there is a possibility to add individual headers. I'm on mobile now, thus not able to do a search. Can have a closer look later. Link to comment Share on other sites More sharing options...
louisstephens Posted February 19, 2018 Share Posted February 19, 2018 Just wanted to say thanks horst for the awesome work on the module! It has truly been a life saver! 1 Link to comment Share on other sites More sharing options...
Peter Knight Posted February 27, 2018 Share Posted February 27, 2018 I moved my site over to a new host and am starting to see errors on my contact form which uses FormBuilder and routes via WireMailSMTP When I submit a form, I receieve the following Quote Unable to verify successful email delivery of this form submission. I wondered if this were a WireMailSMTP issues and tried the Test Settings checkbox Quote 535 Incorrect authentication data The thing is, my PostMark App authentication credentials haven't changed in the move. Just to be sure, I have pasted them in place again with the same result. I then tried to create new Server API tokens, hooked these up and had the same error. I don't believe this is an issue with PostMarkApp (just a hunch) and wondering if anyone had any ideas? Wondered if it might be an issue with the new host stopping somewhow outgoing connections to PostMarkApp etc? Link to comment Share on other sites More sharing options...
cstevensjr Posted February 27, 2018 Share Posted February 27, 2018 35 minutes ago, Peter Knight said: I moved my site over to a new host and am starting to see errors on my contact form which uses FormBuilder and routes via WireMailSMTP When I submit a form, I receieve the following I wondered if this were a WireMailSMTP issues and tried the Test Settings checkbox The thing is, my PostMark App authentication credentials haven't changed in the move. Just to be sure, I have pasted them in place again with the same result. I then tried to create new Server API tokens, hooked these up and had the same error. I don't believe this is an issue with PostMarkApp (just a hunch) and wondering if anyone had any ideas? Wondered if it might be an issue with the new host stopping somewhow outgoing connections to PostMarkApp etc? The key thing is that you changed hosts and now are having issues getting mail to work properly. You need to read up and review how mail is processed at your new hosting company. After finding out how mail works at the new host, you may have to make a few changes to your WireMailSMTP configuration screen to get things working. Additionally, your new hosting company should be able to verify that needed ports are opened (not blocked) for your account. Good luck. 3 Link to comment Share on other sites More sharing options...
Peter Knight Posted February 27, 2018 Share Posted February 27, 2018 43 minutes ago, cstevensjr said: The key thing is that you changed hosts and now are having issues getting mail to work properly. Solved it. I had just assumed that allowing SMTP processing by 3rd parties was a basic feature of mosts hosts. Unfortunately my new host (A2 Hosting) actually don't allow this unless you're on a high level plan. :-/ Link to comment Share on other sites More sharing options...
Waldemar Posted February 28, 2018 Share Posted February 28, 2018 I am using WireMailSmtp for a project. Interestingly everything worked fine while I used it from localhost but as soon as I deployed to webspace and tried using it from the domain it threw me following error: "Call to undefined function wire()" As I was searching for a solution I came to this page : Now I changed every wire() call to ProcessWire\wire() and it worked. Maybe that should be included in a following update? If I am wrong please enlighten me. And if that is the case you might as well explain to me what the problem was Link to comment Share on other sites More sharing options...
nikoka Posted March 5, 2018 Share Posted March 5, 2018 On 1/31/2018 at 11:06 AM, flydev said: I just tested with an Office365 account with these settings, it works well. WireMailSMTP 0.3.0 here. Look like its your credentials that are incorrect ? Double check Thanks @flydev, credentials were alright, but turned out it was the host that was the problem, site is running on A2. So it's the same problem @Peter Knight ran into. Link to comment Share on other sites More sharing options...
Peter Knight Posted March 5, 2018 Share Posted March 5, 2018 1 hour ago, nikoka said: Thanks @flydev, credentials were alright, but turned out it was the host that was the problem, site is running on A2. So it's the same problem @Peter Knight ran into. Hi @nikoka If you're running A2 Hosting on a Lite, Swift or Turbo plan OR Reseller plan then external SMTP servers won't work. Here's the full support page I had just started using A2 for my hosting and was about to migrate about 10 sites from a VPS. Really glad I discovered this early when I had just moved the first site. FYI I moved to Hostinger. I've had a few setup issues but they do allow external SMTP processing. Link to comment Share on other sites More sharing options...
Zeka Posted April 23, 2018 Share Posted April 23, 2018 Does anybody get it working with Gmail SMTP? I always get could not connect to the host "smtp.gmail.com": Connection refused I have tried all possible combinations of settings and ports and double check my credentials. The same thing on localhost and remote hosts. Is it something with Gmail? -------------------- Get it working on the remote host, ports were closed. But what can be wrong with the local setup? Link to comment Share on other sites More sharing options...
gebeer Posted April 24, 2018 Share Posted April 24, 2018 @Zeka you need to go to Gmail settings and allow access for less secure apps there. Then it should work. 2 Link to comment Share on other sites More sharing options...
alexm Posted May 8, 2018 Share Posted May 8, 2018 I'm getting the following error when trying to add an attachment and not quite sure why: Exception: Method WireMailSmtp::attachment does not exist or is not callable in this context. Is there any reason for this that anyone knows of? Link to comment Share on other sites More sharing options...
ethanbeyer Posted May 8, 2018 Share Posted May 8, 2018 @alexmercenary Could you post your code? Chances are the variable you're trying to use the attachment() method on isn't an instance of WireMailSmtp. 1 Link to comment Share on other sites More sharing options...
alexm Posted May 8, 2018 Share Posted May 8, 2018 @ethanbeyer here you go: Should I be doing $mail = $modules->get('WireMailSmtp') or something? $mail = wireMail(); $mail->to($name); $mail->from = 'example@example.com'; $mail->subject("Subject Here"); $mail->body("Hello bla bla bla"); $mail->attachment($filepath); $numSent = $mail->send(); Link to comment Share on other sites More sharing options...
alexm Posted May 8, 2018 Share Posted May 8, 2018 @ethanbeyer Got it sorted. Thank you for pointing that out. I got an instance of the module and then used $mail->attachments(array($filepath => $filename)); And that worked! 1 Link to comment Share on other sites More sharing options...
Jon Posted May 27, 2018 Share Posted May 27, 2018 Hello, Ive but using the module for a few month now (its great thanks!) Over the last couple of weeks I have been experiencing problems. Iam using a office 365 exchange account, which just randomly stops sending. If I run the test is setting it fails. After that if I deselect TLS save a then retick TLS save and test it works again. Any ideas what may be causing this? Link to comment Share on other sites More sharing options...
ethanbeyer Posted May 29, 2018 Share Posted May 29, 2018 @Jon this sounds a little strange. Reading most of your comment, I would think that this might have something to do with your Office365 having sending limits that you're going over. The TLS issue is what makes it weird, though - because if it was a limits problem, that would not be happening. Is there anything in the logs that gives what error is encountered, rather than saying it just stops sending? 2 Link to comment Share on other sites More sharing options...
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