guy Posted November 11, 2019 Share Posted November 11, 2019 Github: https://github.com/theGC/WireMailSendGrid What it does: Extend WireMail to bypass PHP mail and send mail via SendGrids Web API. What you need: A SendGrid account, use this to generate an API Key with Full Mail Send permissions. Once installed, the API Key is popped into the modules config and you should be good to go. Use Cases: It simplifies the process of sending email from servers by removing the need to configure sendmail or other email routing applications on the server. Instead it relies solely on PHP and offloads the sending to SendGrid which can be heavily configured via its UI to ensure better delivery rates for your domain. 4 Link to comment Share on other sites More sharing options...
teppo Posted November 11, 2019 Share Posted November 11, 2019 Hey @guy, thanks for sharing this! Unless I've missed something important, note that your module doesn't actually have to hook into WireMail::___send() – it's a WireMail module, so it should implement its own ___send() method instead. This is how WireMail modules are designed to work, and it also guarantees proper interoperability in the case that other WireMail modules are installed ? See WireMailMailgun for a reference. 3 Link to comment Share on other sites More sharing options...
guy Posted November 11, 2019 Author Share Posted November 11, 2019 @teppo thanks pal Yeah I noticed as soon as this was uploaded. Just tweaking it now but as you say no need for the hook as allows it to play better with other WireMail modules. 2 Link to comment Share on other sites More sharing options...
ngrmm Posted January 18, 2020 Share Posted January 18, 2020 hey @guy i installed this module and have a free-sendgrid account. generated an API key and did this: $m = new wireMail(); $m->body('hello'); $m->from($email = 'test@test.com', $name = 'John'); $m->to($email = 'mail@test.com', $name = 'Jane', $substitutions = null, $subject = 'TESTING'); $m->___send(); Email is send out and delivered. But i don't see any statistics about them being sent on sendgrid. Did i forgot something? Tracking is enabled. Link to comment Share on other sites More sharing options...
guy Posted January 18, 2020 Author Share Posted January 18, 2020 @ngrmm I'm not exactly sure but I have just rolled an update to 1.1.3. I've tested this version and I can see sent and open stats within my admin console: https://app.sendgrid.com/email_activity let me know if this helps. Link to comment Share on other sites More sharing options...
ngrmm Posted January 18, 2020 Share Posted January 18, 2020 (edited) did the update i guess there's a typo this appears on the settingspage of the module Edited January 18, 2020 by ngrmm Link to comment Share on other sites More sharing options...
ngrmm Posted January 19, 2020 Share Posted January 19, 2020 hi @guy i corrected that comma on line 132 still getting no statistics/activity-data on sendgrid. maybe its like this because of SSL (https)? Link to comment Share on other sites More sharing options...
guy Posted January 20, 2020 Author Share Posted January 20, 2020 @ngrmm thanks for letting me know about that config issue. Will get that sorted in a min. On the SendGrid front I'm not too sure. SendGrid should show sent and received stats for all messages, therefore if you're not even seeing that (and the message is delivered) then something else is probably not quite right. 1 Link to comment Share on other sites More sharing options...
guy Posted January 20, 2020 Author Share Posted January 20, 2020 just updated to v1.1.4 with the bug fix 1 Link to comment Share on other sites More sharing options...
ngrmm Posted January 20, 2020 Share Posted January 20, 2020 4 minutes ago, guy said: just updated to v1.1.4 with the bug fix thx it's weird, maybe i try mailgun and see what happens there Link to comment Share on other sites More sharing options...
benbyf Posted June 21, 2021 Share Posted June 21, 2021 Hi Hi, trying to use this module with Snedgrid but seem to be un able to know if the communication is happening... I've set up an account, verified the domain and email address, set up an API key and adding the code as follows but cant seem to get any emails or activity on sendgrid... anything missing or is this module no longer compatible? $mail = $modules->get('WireMailSendGrid'); $mail->to("******@gmail.com"); $mail->from("site@*********"); $mail->subject("test"); $mail->bodyHTML("hello"); $success = $mail->send(); 1 Link to comment Share on other sites More sharing options...
netcarver Posted June 21, 2021 Share Posted June 21, 2021 @benbyf I think there are other SendGrid modules you could try out. Caveat: I haven't used any of them. 1 Link to comment Share on other sites More sharing options...
benbyf Posted June 21, 2021 Share Posted June 21, 2021 1 hour ago, netcarver said: @benbyf I think there are other SendGrid modules you could try out. Caveat: I haven't used any of them. these other ones havent been touched on 7 or 9 years :( Link to comment Share on other sites More sharing options...
ngrmm Posted June 21, 2021 Share Posted June 21, 2021 3 hours ago, benbyf said: Hi Hi, trying to use this module with Snedgrid but seem to be un able to know if the communication is happening... I've set up an account, verified the domain and email address, set up an API key and adding the code as follows but cant seem to get any emails or activity on sendgrid... anything missing or is this module no longer compatible? hey @benbyf, as you see above i had/have same problems. Back then i read something about issues with SSL preventing tracking. Link to comment Share on other sites More sharing options...
wbmnfktr Posted June 23, 2021 Share Posted June 23, 2021 Hey @benbyf... I don't know if it's working now within your project... so I'll make it short: The module is working perfectly fine in my setup which is 10 minutes old and is running on PW 3.0.179. I just created an API key, limited it to just sending mails, put it in the module config and everything was fine - almost. The sandbox option prevents sending mails so it needs to be removed. I don't use any of the other options within the module expect logging. SendGrid tells you your usage (you fill find that link in the bottom of the sidebar) so you can check if something was sent. Another option is of course this gem here: https://processwire-recipes.com/recipes/logging-outgoing-emails/ (which is in place as well and logged all of my test mails). 3 Link to comment Share on other sites More sharing options...
benbyf Posted June 23, 2021 Share Posted June 23, 2021 3 hours ago, wbmnfktr said: Hey @benbyf... I don't know if it's working now within your project... so I'll make it short: The module is working perfectly fine in my setup which is 10 minutes old and is running on PW 3.0.179. I just created an API key, limited it to just sending mails, put it in the module config and everything was fine - almost. The sandbox option prevents sending mails so it needs to be removed. I don't use any of the other options within the module expect logging. SendGrid tells you your usage (you fill find that link in the bottom of the sidebar) so you can check if something was sent. Another option is of course this gem here: https://processwire-recipes.com/recipes/logging-outgoing-emails/ (which is in place as well and logged all of my test mails). Thanks, I think there was several things, I hadn't verifed the email account properly, I found the PW logs and sorted it out, then found that sendgrid simply isn't logging anything, not a peep... emails are getting sent so i suppose it just takes a while to register on their stats or something but its really strange. 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted June 23, 2021 Share Posted June 23, 2021 (edited) On 6/23/2021 at 10:41 PM, benbyf said: sendgrid simply isn't logging anything, not a peep... In my case everything was logged as expected. Each and every try was in the logs. On 6/23/2021 at 10:41 PM, benbyf said: takes a while to register on their stats The website was almost on point... maybe a minute or so off but yet... pretty good. Almost too good. But hey... perfect... it's working for you now. Awesome! Short update here: While SendGrid and the module work as expected I/we moved on using mailjet.de with WireMailSmtp. The project (as in "client") wants and needs to be perfectly fine with DSGVO/GDPR and therefore Mailjet was the better option. As they (client) send quite a huge amount of mails of any kind they were ready to pay one of their standard plans that should fit their needs. I disabled all tracking, opening and whatever options they offer in the settings as the project should create through all instances only a very small data footprint with as little data as possible. Right now the client and their "data and privacy" consultant are quite happy. So... if you are within the EU (or have been in there) look at mailjet. As Mailgun and Mailjet are somehow one company... I will play with the WireMailMailgun module in the next weeks. Maybe it works. Edited July 1, 2021 by wbmnfktr Update notice: Mailjet 2 Link to comment Share on other sites More sharing options...
ngrmm Posted August 2, 2021 Share Posted August 2, 2021 On 6/23/2021 at 10:46 PM, wbmnfktr said: As Mailgun and Mailjet are somehow one company... I will play with the WireMailMailgun module in the next weeks. Maybe it works. Hi @wbmnfktr, look here: https://dr-dsgvo.de/ist-mailjet-datenschutzkonform-nutzbar/ I don't know if this is a reliable source but sounds legit. And did it work for you with the WireMailMailgun? 2 Link to comment Share on other sites More sharing options...
wbmnfktr Posted August 2, 2021 Share Posted August 2, 2021 3 hours ago, ngrmm said: Hi @wbmnfktr, look here: https://dr-dsgvo.de/ist-mailjet-datenschutzkonform-nutzbar/ I don't know if this is a reliable source but sounds legit. Ok, that's interesting. Just gave it a quick look and have to look closer into this the next days but... well that could be a dealbreaker. 3 hours ago, ngrmm said: And did it work for you with the WireMailMailgun? Haven't had enough time for that. I just use it with WiremailSmtp and it works pretty well so far. 1 Link to comment Share on other sites More sharing options...
teppo Posted August 2, 2021 Share Posted August 2, 2021 I am by no means an expert on this area (IANAL etc. ?) but this is worth checking out: https://ec.europa.eu/commission/presscorner/detail/en/ip_21_2847. While privacy shield is no longer applicable, standard contractual clauses still are. As such, I wouldn't completely rule out a company with non-EU presence. Most email service providers have comprehensive GDPR info available, and most of them also seem to provide a DPA (data processing agreement/addendum) for their clients, at least on request. Anyway, just my five cents. Of course when in doubt, it's a good idea to consult lawyer. Preferably one with experience in GDPR and Internet privacy ? 1 1 Link to comment Share on other sites More sharing options...
cryostar Posted October 27, 2021 Share Posted October 27, 2021 I just came across this module and I'm just curious how do we send the unsubscribe group ID for this one? Generally, the approach is to add it in the JSON: { asm: { group_id: <the unsubscribe group ID> } } but I checked the modules and there's setCustomArgs, setSection, and I don't know which of these I should put this parameter. 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