Jump to content
Sign in to follow this  
srobertson

SMTP Connectivity Issues with AWS & FM Starting Point

Recommended Posts

I have recently purchased the Email plug-in to use with my FM Starting Point database. I have signed up with AWS and got my account out of sandbox but can't seem to authenticate. I run the script debugger and it gets past the authenticating with 360 works and only has a problem with it try to connect with my AWS SMTP server. Any ideas?

Also, I was able to send successfully with SMTP credentials using the FMP Email Client provided.

Edited by srobertson
Updated info

Share this post


Link to post
Share on other sites

Hi srobertson,

There are two ways to utilize AWS email capabilities with the 360Works Email plugin. The first is to use the function EmailConnectAmazon. This function takes two parameters, an access key and secret key, that are generated for an IAM user. This IAM user also needs to have permissions to access the Simple Email Service so make sure that the correct permissions are applied to the user associated with the keys you are using. If you are unsure, please see this video on how to create IAM users, apply the appropriate permissions, and generate keys. These keys are not to be confused with SMTP keys. SMTP keys look similar to access key/secret keys but only allow access to the SMTP endpoint. You would also use the EmailConnectSMTP function to connect and authenticate in this case. These keys are generated in the SMTP Settings menu in the Simple Email Service module in your AWS account. I am not sure how FMStarting Point utilizes the Email plugin in the solution but I suspect that your issue is either due to incorrect permissions or incorrect keys. 

Please let me know if you have any questions!

Share this post


Link to post
Share on other sites

The code is using the following call with the same settings that I used in the example Email Client..

    EmailConnectSMTP(         $smtp|server ;         $smtp|from_address ;         $smtp|password ;         $smtp|ssl     )

$smptplserver = email-smtp.us-west-2.amaoneaws.com

$smtplfrom_address = steve@robertsonmarketingsolutions.com

$smtplpassword =??

$smtplssl = ssl=1

 

I am using SMTP Keys so I have the right keys and using the same username and password on both so I don't understand why the function doesn't seem to be working????

Share this post


Link to post
Share on other sites
10 hours ago, srobertson said:

$smptplserver = email-smtp.us-west-2.amaoneaws.com

 

I am not sure if this was a typo when typing your response but in case it was a copy/paste from FileMaker, this is an invalid host name. It should be email-smtp.us-west-2.amazonaws.com

The "userName" and "password" parameters for the EmailConnectSMTP function are where you input the SMTP keys you generated. These are the credentials that authenticate the connection request to the AWS SMTP endpoint. The email address you verified for sending is entered in the EmailCreate function as the "from" parameter.

With that being said, if you are going to be using AWS's Simple Email Service to send emails I highly recommend that you use the dedicated function EmailConnectAmazon discussed in my post above. Using it eliminates the need to know hostnames, usernames, passwords, or SSL/TLS settings. You can see a basic example of its usage here. Please let me know if you have any questions!

Share this post


Link to post
Share on other sites

Yes, it was a typo caused by auto correct. Anyway, I will try changing the code to use the EmailConnectAmazon function that you mentioned. I guess I will need to go generate a new access key / secret key combo also.

Thanks

Share this post


Link to post
Share on other sites

OK, I followed the example and changed the code to use EmailConnectAmazon as suggested and I am able to successfully go through all the steps with no error up to the SendMail command which gives an error which is enclosed.

Screen Shot 2019-08-28 at 8.31.54 AM.png

Share this post


Link to post
Share on other sites

It looks like a null value is being passed in for the "accessKey" parameter. If you are using a field reference for the accessKey parameter, do you still get the error if you use the actual key instead of a field reference?

Share this post


Link to post
Share on other sites

The Access key is only used in the EmailConnectAmazon and I tried substituting the field reference with the actual value and I get the same results. As I previously mentioned this connect is returning a result of 1 which indicates that it was successful. It is only on the EmailSend command that I am getting this error.

Share this post


Link to post
Share on other sites

go ahead and reproduce the error and send your logs to us at support@360works.com. Please be sure to reproduce the error and then send the logs before any restarts of FileMaker as restarting will overwrite the logs. See this page for log locations. Reference this thread in the body of your email. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.