milky Posted June 18 Posted June 18 I am attempting to send an email in Filemaker with the following: - Outgoing SMTP Server: smtp.mail.yahoo.com.au - Port: 465 - Connection encryption: SSL - Authentication: Plain Password - User name: my email address - Password: app password generated in Yahoo. When I run the script I get an error - Unknown Error:20639 and when I click OK my Custom Dialog appears stating The test email was sent. My script is as follows: Set Error Capture On Send Mail If Get LastError not = 0 Show Custom Dialog Email Failed Else Show Custom Dialog The test email was sent. Obviously Filemaker is not recognising the error, to show the 2nd Custom Dialog. Any help would be appreciated.
comment Posted June 18 Posted June 18 22 minutes ago, milky said: Obviously Filemaker is not recognising the error, to show the 2nd Custom Dialog. It's hard to tell what is really happening because what you are showing us here: 23 minutes ago, milky said: If Get LastError not = 0 is not valid code, neither as script nor as a calculation. Please post the exact script step, either as a screenshot or - even better - by printing out your script to PDF and copy/paste from there. My guess (!) is that if your script went like: Set Error Capture [ On ] Send Mail [ ... ] If [ Get ( LastError ) ] Show Custom Dialog [ "Email Failed." ] Else Show Custom Dialog [ "The test email was sent." ] End If it would work as you expect.
milky Posted June 19 Author Posted June 19 Thanks Comment, My script is as follows: Menu: Test Send Email Set Error Capture [ On ] Send Mail [ Send via SMTP Server; To: "[email protected]"; Subject: "Filemaker Test"; Message: "This is an email sent via smtp"; Name: "xxxx"; Email Address: "[email protected]"; Reply-To Address: "[email protected]"; SMTP Server: "smtp. mail.yahoo.com.au"; Port: 465; Use SSL; Authentication Type:Plain Password; User Name: "[email protected]"; Password: "xxxxxxxx" ] [ No dialog ] If [ Get ( LastError ) ≠ 0 ] Show Custom Dialog [ Title: "Email Failed"; Message: "Error Code:" & Get ( LastError ); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ] Else Show Custom Dialog [ Title: "Email Sent"; Message: "The test email was sent"; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No”] End If The error message is appearing (as shown in the image below) after running the script. After I click ok on the error message, the Custom Dialog "The test email was sent" appears, which should mean that the email was sent, but nothing is sent.
comment Posted June 19 Posted June 19 I am puzzled. From what I have read, such error can be caused by an antivirus program. But I have no idea why the error message isn't suppressed by turning error capture on or why the error itself is not captured.
milky Posted June 20 Author Posted June 20 Thanks Comment, I tried to send an email using File/Send/Mail and this worked correctly. I then re-ran the script and this also worked, so maybe there was something in the File/Send/Email which overcame any issues??? Thank you for your assistance.
comment Posted June 20 Posted June 20 12 hours ago, milky said: maybe there was something in the File/Send/Email which overcame any issues??? I doubt it, but I wasn't there, so ...
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