Email Plugin

Hi! Great plugin and works well so far.

Do you think it would be possible to update it to include an option to use the Amazon SES SMTP interface?

I’d like to use Amazon SES, as there are no sending limits in the far off chance my project becomes popular. Its a photography adventure game and I want users to be able to email themselves photos, but use one global email as the default so they don’t have to input their information and deal with adding third party passwords to make it easier on the user.

I did try setting up a pass through email through another gmail account, that uses amazon ses STMP and acts as the default for that gmail account. It works and sends messages through Amazon SES, but whenever I send an email through the plugin, it does not go through the STMP, and goes through gmail instead. Maybe I’m going about it the wrong way…

Hi, great to hear that the plugin works well :slight_smile:

Which node are you using to send emails?
if you are using the SendEmail or SendEmail (Email Details Object) nodes then I guess it wouldn’t work as you can only select the three default email services (SMTP servers) Gmail, Outlook and Yahoo. Since the last update, I added a new SendEmail (Custom SMTP Server) which allows specifying any SMTP server. You should be able to do what you described using that node.

If you are already using that node then I will have to look into it as maybe there is something else that needs to be done.

I did not see that option in the pdf. Sorry! I did just try it and its not working. There is no user name input, I tried using the sender name for it instead but no luck. It does take a good 15 seconds to fail so its doing something…I have to run to work, but I’ll take another shot at it this weekend.

edit. Amazon SES is free to start up and if you stay in sandbox mode there are no charges. If that helps in testing it…

edit 2: yeah, its not working. I feel like the problem is there is no STMP username field.

Just checking and seeing if you have plans to update it or tell me what I might be doing wrong. Custom STMP server doesn’t seem to work without a STMP username field.

Hi Dogü sorry to get back to you a bit late but I have been crazy busy. Thanks for letting me know that the Amazon SES it’s free to start up with. I will be testing this tomorrow and see if I can get it running.

If an extra field for an STMP username is required I will definitely make the changes and update the plugin.

Hi @Dogū

I have looked into this deeply and you were right in assuming that what was missing was a dedicated field for the username. Actually the field has always been there but it was normally automatically filled by the email address itself since the login process was done using the email address as the username. I have exposed a new property on the SendEmail (Custom SMTP) node that’s called Username.

If you don’t specify the Username the login defaults to using the email address as the username, however, if you specify a username it then gets used for services such as Amazon SES. One thing I struggled with (since I had no idea of how to use Amazon SES, you may already know about this) is that if you want to send emails using a specific email address already verified on Amazon SES to another email address you still must verify also the recipient email address IF you are in sandbox. If you don’t do so you’ll get an error that reads something like bad body message.
I have found out about this here.

I am preparing a new version to release and this may take some time (the marketplace guys need to review it and accept it) so if you are confident with modifying the source code of the plugin, all you have to do is adding a username FString in the SendEmail(Custom SMTP) node inside the function library pass that into the FSendEmail latent class constructor and use it as “mail.SetLogin = username” replacing its previous use.

Once the plugin has been updated you should use the node as in the image below:

I will let you know as soon as the plugin update is available.

1 Like

Awesome. Thank you! I did know about the verified email thing…So glad you got it working, and I think it will definitely help other customers down the road once they find out the sending limits of gmail and yahoo.
I didn’t mean to rush you and I will wait for the update. Cheers.

@Dogū no problem at all and you didn’t rush me, it’s just that weekends are really a good time for me to look into this kind of things. Anyway, the update is live let me know if you need help either here or on the discord channel.

It works. Thank you so much!

Hi to everyone!
I’ve an issue building for android arm64: my device send me this error: “Plugin ‘EmailPlugin’ failed to load because module ‘EmailPlugin’ could not be found”. How can I solve this? I’ve not too much experience.

Thanks in advance

Hi @Ing_Ferri sorry to hear you are having trouble compiling for Android. Somebody else had issues with compiling for Android and was getting exactly the same error. After investigating this myself, I have found out that due to some limitations of how plugins work in UE4 for Android you can’t package unless you place the plugin into the project folder and your project must be a C++ project.

So what you have to do it’s the following:

  1. Convert your project into a C++ project. This can be done by simply adding a single actor C++ class to your project and compiling. If the project doesn’t compile you may need to install visual studio on your machine.
  2. Go to your [EngineFolder]/Engine/Plugins/Marketplace copy the EmailPlugin folder and place it inside the [ProjectName]/Plugins folder. If the Plugins folder doesn’t exist then create it.

if you have successfully done the above then the project will now package the plugin correctly for Android. If you need more assistance let me know either here or on discord and I will help you.

Hello,

Thanks for your plugin, it seems to do most of what i want from it.
But i have a few problems.

  1. It doesn’t seems to do well with some characters
    “é” shows “è”
    I think that it comes from the email header Content-Type (Content-Type: text/html; charset=“UTF-8”)

  2. I can’t send more than one attachment.
    I have 0.png and 1.png in the array, but it only send 1.png (the last index)

  3. I would like to change the name of the attached file.
    Since i have to give the full path of the file it seems to use all that path as the name.
    The best would be for it to use only the last part. For C:/MyProject/0.png it should name the file 0.png

  4. I use custom SMPT and it would be great if i could hide the password like with make email details

Hi @Pierre.W

Thanks for purchasing the plugin and sorry to hear you are having a few issues. Nothing to worry about though I will try my best to fix all of them. I have added all of the issues/bugs point to my to-do list/bugs list.

As a quick reply to each:

  1. That’s right the charset is UTF-8, I should be able to expose a variable either on the nodes or somewhere else to change the encoding.
  2. That sounds 100% like a bug you should be able to send as many as you want. Thanks for reporting it.
  3. That’s something I actually already tried to solve and didn’t succeed. If I recall well it was something I didn’t have much control over. I will still try to look again into it though and see if with a fresh eye I cam find a solution.
  4. That should be totally possible I will just create a new node that works with a custom SMTP server and can accept the output of the make email details node.

I don’t know what’s the timeline on this as I could easily solve all of them in one evening or they could take me longer. I will keep you updated as I solve each issue.

Hi @Pierre.W

Surprisingly I have actually managed to fix all the 4 issues you were having pretty easily and actually fixed an extra one I discovered. I just uploaded the updated version which will be available within a few days/within a week depending on the guys at epic speed in reviewing the update.

I will let you know when the update went live.

EDITED: Actually I just remembered that I didn’t need to fix the multiple images being sent as that works fine for me. I can send multiple attachments and they all get delivered with the email. What I think it’s probably happening for you is that the file does not actually exist when you send the email or you are providing the wrong path. What I would do is using the “DoesFileExist” node to make sure that all the files you are sending exists on disk before attempting to send the email. Also (and you are probably already doing this, but worth saying it) the path expected for the files is always an absolute path.

Well, I don’t know exactly how but the guys at epic were real fast and accepted my update almost instantly which is awesome. Update 1.3 if officially available right now.
@Pierre.W let me know if you can see all of your issues solved with this new version and if you need help debugging the attachments only being one issue.

Thanks for your quick work.

I checked and everything seems good.

  1. I can use UTF-8 chars (éèà …)
  2. As you said the bug came from me. I create the file in the same time as i send the email, and the first one wasn’t created yet when the mail was sent. I added a delay and i now have 2 attached files
  3. Good job, the files are named 0.png and 1.png (and not the full path name). I think the best would be to be able to specify the name, but it’s enough for me.
  4. Tested and it works.

One last question (but it’s not important). Is it possible to add other receiver. For now i have to send 2 emails if i have 2 recipient. It’s not a big deal, but when the attached file is large it double the time.

Again thank you for your work.

Hi @Pierre.W

Glad to hear everything works as expected :cool:

I have already been asked to add a functionality that allows specifying multiple receivers and so far I have been reluctant in implementing it since I don’t want the plugin to be misused (like sending spams). I obviously don’t mean that you would do such a thing. One thing I have been considering is to add support for CC other email addresses but I’m not sure about this solution either. If the issue is dealing with sending large files attached to multiple emails then there may be other solutions that I could implement, I will keep you updated on this.

Hi everyone,

Just so you know I have finished updating the documentation so that it reflects all the latest changes in the plugin.

Hello,

I would like to use your plugin in VR but anytime I try to trigger the event, I get this message in the output log:
LogEmailPlugin: Warning: Error in message body
and the mail won’t be send.

To Test the Plugin I made a simple Event in the VR template from Unreal:
The input of Username in the Send Email Node and the Sender Email in the Make EmailDetails Node are in my case the same.
The Server Name and Port i got from my EMail Provider:
https://hilfe.gmx.net/pop-imap/imap/outlook.html

Do you know what I’m doing wrong?

Thanks & best regards

Hi @ReSe0604, thanks for purchasing the plugin.

I can tell with certainty that the issue is not that you are using the plugin in VR and that the issue has to do with using a custom SMTP server. So far I have only tested Amazon SES for the custom SMTP server so I’m pretty sure there can be issues in the way the node handles communicating with the SMTP service. I did introduce the concept of a username since Amazon SES required it but now I’m wondering if each service will behave differently.

Your node set up looks good to me so you are not doing anything wrong. So let’s try the following in order:

  • The first thing I would try is completely removing the username. What happens if you leave it empty?
  • Are you sure there isn’t a username or alias that gets used with the provider in order to use the service? If there is a username, can you change it? If so could you try to set it to something that isn’t your email address?
  • Finally, if you could make me a user profile with that email provider I could test this myself and see what happens in the background. If you actually managed to create one just DM me, email me or DM me on discord.