Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: dougiefresh on September 14, 2017, 02:44:17 PM

Title: Elastic EMail for SMF
Post by: dougiefresh on September 14, 2017, 02:44:17 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4153)



ELASTIC EMAIL MOD v1.7
By Dougiefresh (http://www.simplemachines.org/community/index.php?action=profile;u=253913) -> Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=4153)



Introduction
Some webhost providers, such as GoDaddy, limit the number of emails that a website can send to some dreadfully low number, like 250 per day.  This is fine for extremely small forums, but can quickly be exhausted with even a small amount of email sending by the forum.

This mod adds code to allow the SMF forum to send email via the ElasticEMail.com (http://www.elasticemail.com) REST API, which can support up to 150,000 (150 thousand) emails per month for free (roughly 5,000 per day, if the emails are spread evenly over a month).

If sending the email through the Elastic EMail server fails for some reason, then the email will take it's usual route through the SMF code to be sent.

Mod Requirements
It should go without saying that you need to sign up for a ElasticEMail.com (http://www.elasticemail.com) account.  There you will be able to get the username and API key that this mod requires.

You also must be able to modify your domain's DNS records in order to maximize the number of emails your forum can send.  If you fail to do so, you will be limited to 500 emails per day.  Further instructions can be found at the Elastic EMail's Settings: Using Your Domain (https://elasticemail.com/support/user-interface/settings/your-domain/) page.

BE FOREWARNED: I WILL NOT ASSIST WITH DOMAIN DNS RECORD CHANGES!!!  You have been warned!  If you are (1) uncomfortable with, or (2) unable to make these changes, this mod is NOT FOR YOU!

Admin Settings
There is a new section under Admin -> Maintenance -> Mail -> Elastic EMail.

Translators
o Spanish: Juan Carlos (https://www.simplemachines.org/community/index.php?action=profile;u=2767)
o Spanish Latin: Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597)

Compatibility Notes
This mod was tested on SMF 2.0.13 and SMF 2.1 Beta 3, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported. 

Related Discussions
o Add REST API (http://www.simplemachines.org/community/index.php?topic=512386)
o Add REST API (http://www.simplemachines.org/community/index.php?topic=551178.0) (split from first topic)

Changelog
The changelog can be viewed at XPtsp.com (http://www.xptsp.com/board/free-modifications/elasticemail-for-smf/).

License
Copyright (c) 2017 - 2018, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Title: Re: Elastic EMail for SMF
Post by: vbgamer45 on September 14, 2017, 04:25:45 PM
Elasticmail does require you to have an address/name/company name. So make sure if you use. Put your company/or po box address in the settings.
Title: Re: Elastic EMail for SMF
Post by: Stanyy on October 14, 2017, 01:10:10 PM
Hello,

This is a lovely idea, but for some reason it doesn't seem to work on my forum (smf 2.0.9).

There's an empty red alert box on the settings page. Also I don't see the "Domain Configuration Results" block shown in the mod screenshot.

I took a screenshot of my settings page (see attachment).
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on October 17, 2017, 01:05:09 PM
Uploaded v1.1 - October 17th, 2017
o Fixed misspelling of text strings used by the mod.
o Fixed domain-inclusion issue of the "no domain found" error message.




@Stanyy:  Hopefully, this update fixes the issue you reported.
Title: Re: Elastic EMail for SMF
Post by: Juan Carlos on December 23, 2017, 07:53:21 PM
Hi

I am testng this mod and I installe in a SMF 2.1 Beta 4.

The instalattion was ok (Emulating 2.0) but now I have this error in the log:
Quote
Type of error: General
Unable to load the 'ElasticEmail.english' language file.
http://www.260mirod.com/forum/index.php?action=admin;area=mailqueue;sa=elastic;bcd94620f=517ed0948359fc8edf5b54fa5671bb6e
and in the config area I have this:
QuoteWARNING: No domain status found for domain "www.mydomain.com". This does not mean that this mod will not function, though.

Thank you
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on December 25, 2017, 08:49:23 PM
Uploaded v1.2 - December 25th, 2017
o Added SMF 2.1 Beta 3 support with minor change to package-info.xml.
o Fixed LoadLanguage statement in Subs-ElasticEMail.php.
o Added code to attempt to discover status of OpenSSL support and set HTTPS option automatically.
o Added check to make sure API key is entered before testing API key...




@Juan Carlos:  This version fixes the bug you reported.  Thank you for reporting it!
Title: Re: Elastic EMail for SMF
Post by: Juan Carlos on December 26, 2017, 11:00:03 AM
Thank you dougiefresh

I update to this version and the error in loadlanguage is fixed but the:
QuoteWARNING: No domain status found for domain "www.*****.com". This does not mean that this mod will not function, though.
is steel there.
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on December 29, 2017, 10:47:52 PM
Quote from: Juan Carlos on December 26, 2017, 11:00:03 AM
Thank you dougiefresh

I update to this version and the error in loadlanguage is fixed but the:
QuoteWARNING: No domain status found for domain "www.*****.com". This does not mean that this mod will not function, though.
is steel there.
PM sent....
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on December 30, 2017, 11:29:43 AM
Uploaded v1.3 - December 30th, 2017
o Added code to properly determine domain name from URL.
o Fixed issue where forum domain wasn't found in domain list from ElasticEMail.com.
o Moved code that included the template to after the domain searching code.




@Juan Carlos:  Thank you for your assistance!  The issue/bug you reported should be fixed with this version!
Title: Re: Elastic EMail for SMF
Post by: Juan Carlos on December 30, 2017, 01:26:48 PM
Thanks dougiefresh

Great work

I am sending attached the language "spanish_es" if it is of interest.
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on December 31, 2017, 07:19:47 AM
Uploaded v1.4 - December 30th, 2017
o SMF 2.1: Fixed template function to use SMF 2.1 method for built-in icons.
o Added Spanish translation, courtsey of Juan Carlos (https://www.simplemachines.org/community/index.php?action=profile;u=2767)!




@Juan Carlos:  Thank you for the translation!  It's been included in this version!
Title: Re: Elastic EMail for SMF
Post by: Dwev on February 16, 2018, 05:31:39 PM
I installed this Mod and did all of the things that Elastic Email wants you to do.

So in the dashboard on the site of Elastic Email I have green checkmarks on everything (Default, SPF, DKIM, Tracking, MX and DMARC).

But in my SMF forum under Admin -> Maintenance -> Mail -> Elastic Email everything shows green ticks, except for "Verification is available?", which shows a red cross.

Does anybody knows what this means, and more important, how I can get a green tick there as well?
Title: Re: Elastic EMail for SMF
Post by: Dwev on February 17, 2018, 04:38:35 AM
By the way, now that the forum is up and running I can see that Elastic Email is working in the Reports on the Elastic Email website.

But the red cross (x) is still showing in Admin -> Maintenance -> Mail -> Elastic, so I'm hoping someone can tell what this means.
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on February 17, 2018, 11:35:15 AM
@Dwev:  The issue SHOULDN'T have any effect on whether the mod successfully works on your forum.  It is only displaying the information that can be gleaned through the API, and I admit, I may have something wrong in the code!  I also may need to just drop that line....

Regarding diagnosing the issue, I'm sending you a PM with instructions.  Thanks again!
Title: Re: Elastic EMail for SMF
Post by: Juan Carlos on February 17, 2018, 12:21:41 PM
Hi,

Quote from: dougiefresh on February 17, 2018, 11:35:15 AM
@Dwev:Regarding diagnosing the issue, I'm sending you a PM with instructions.  Thanks again!
I have the same issue in my forum.

Thanks
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on February 17, 2018, 12:28:20 PM
@Juan Carlos:  Sent you one, too....
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on February 17, 2018, 01:22:29 PM
Uploaded v1.5 - February 17th, 2018
o Removed "Verification is available?" line from ElasticEMail settings page.




@Everybody:  Thanks for the assistance!
Title: Re: Elastic EMail for SMF
Post by: Dwev on February 18, 2018, 12:40:17 PM
Should we remove the previous version before installing this one?

Or is it possible to install the new version while the older one is installed?
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on February 18, 2018, 08:14:32 PM
Used to support upgrades in early part of my smf-development career...  Not anymore!  Such a pain in the butt!   Removal is required. 
Title: Re: Elastic EMail for SMF
Post by: -Rock Lee- on February 19, 2018, 09:26:19 PM
Here, taking some time to translate it into Latin Spanish 8). Thanks for sharing...


Regards!
Title: Re: Elastic EMail for SMF
Post by: Dwev on February 20, 2018, 11:58:37 AM
Quote from: dougiefresh on February 18, 2018, 08:14:32 PM
Used to support upgrades in early part of my smf-development career...  Not anymore!  Such a pain in the butt!   Removal is required.

No problem, removed the older version and installed the new one without a problem, all seems fine!  :D
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on February 20, 2018, 07:32:29 PM
Uploaded v1.6 - Februray 20th, 2018
o Added Spanish Latin translation, courtsey of Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597).




@Rock Lee:  Thanks for the translation!!  It's been included in this update!
Title: Re: Elastic EMail for SMF
Post by: Vincenz0 on February 21, 2018, 05:41:15 AM
Hey man.

Thanks for this awesome mod.

I have a problem though, but not with the mod i think but with elastic email.. and i can't figure out how to fix it.

I tried it out and all works, fully verified my domain and i send myself a PM and the mail came. buut.. on the bottom of the mail elastic mail simply printed my full personal name, and address that i used to sign up for elastic mail.. and after it a unsubscribe link to elastic mail..

How the hell can i turn it off that it prints my personal information there?
Google is no help here.

Cheers,
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on February 21, 2018, 09:50:47 AM
Good question, I've found some API information that I can maybe use to do so in the mod.  Let me do some testing of the API and see what I can accomplish....
Title: Re: Elastic EMail for SMF
Post by: Dwev on February 21, 2018, 12:00:51 PM
@ Vincenz0: I had exactly the same problem, but found out that you can change it in your account on the EE website in just about anything.

I changed it into our business address instead of my personal address (wasn't really looking forward to having all of the members of the forum showing up on my doorstep...  ;)).
Title: Re: Elastic EMail for SMF
Post by: dougiefresh on October 12, 2018, 10:19:20 PM
Uploaded v1.7 - October 12th, 2018
o No functionality change.
o Updated documentation to point to new website.