Matt Haughton's Blog

Nullius addictus jurare in verba magistri – Just stop and consider the complexity

FileMaker Send Mail step (with SMTP server option)

with 30 comments

I use a Macbook Pro running OS X 10.5.6 and I’m running FileMaker Pro Advanced 10.0v1.

I’ve run into a problem with this specific setup when using the Send Mail step with the SMTP server option in a solution.

The problem I came across is that the step wouldn’t send an email and returned the error code 1506 – “Email(s) could not be sent successfully.”

I filled in all the relevant fields for the SMTP server and for the email. I checked the data was accurate but couldn’t get an email to send.

I have read on forums that there is a problem with the ‘Name’ field in the SMTP server settings. That this field is not transmitted to the server correctly due to some utf-8 encoding problem. I’m not sure exactly what the root cause is but the behaviour is mentioned in Knowledge Base article 6839 point 2.2 (http://filemaker.custhelp.com/cgi-bin/filemaker.cfg/php/enduser/std_adp.php?p_faqid=6839).

So I removed the contents of the Name field and the Send Mail step works as expected.

Perhaps this problem is the same thing other users are experiencing
http://fm.lithium.com/fm/board/message?board.id=aut&message.id=442

except that my SMTP server simply rejects the entire SMTP message rather than accepting a Name field it can’t interpret correctly.

Bottom line is that clearing the Name field ‘worked around’ the problem. I have reported this issue to FIleMaker directly and look forward to it being fixed in the patch.

About these ads

Written by matthaughton

January 20, 2009 at 11:13 am

Posted in FileMaker

30 Responses

Subscribe to comments with RSS.

  1. I have the same thing on my Windows FM10 Adv – “Email(s) could not be sent successfully.” BUT, I have found that the emails are being sent. I activate the script 5 times with no change and maybe 2-3 of those will get the “Email(s) could not be sent successfully.” error but it does go out as expected. I use gmail for the outgoing mail server, so I can log into that account and look in the sent folder and they are ALL there and they are received properly. Can’t seem to get an answer as to why this error sometimes pops up!

    Robert

    March 20, 2009 at 6:59 pm

  2. Hi,
    I am having the same problem documented above. I am using Filemaker Server 10 Advanced on an Apple leopard Server. I am sending out 600 emails in a batch, including a “dummy” gmail account that i have—I get the error message “Email(s) could not be sent successfully.” ….but I successfully get the email in my gmail account. I want to know of the other 600 people are also getting the email! ….Is there a log script step …or SOMETHING that can tell me if: 1) these emails are getting sent 2) who is getting them and who is not getting them ….

    and, oh yeah, 3) why am I getting these messages ….

    Jim

    May 17, 2009 at 12:41 am

  3. Jim – I take it you are not filling in the Name field of the email as mentioned in the post?

    The truth is there seems to be a problem with FileMaker transmitting the Subject as well – if you look at the Raw Source of the email you received from FileMaker and look for something like the following

    X-ASG-Orig-Subj: =?UTF-8?B?Q0ZFeHBsb3JlciB2MS4w?=
    Subject: =?UTF-8?B?Q0ZFeHBsb3JlciB2MS4w?=

    Notice how the UTF-8 is surrounded by question marks, well I don’t think it should be, other than that though I really can’t help

    I know FileMaker only supports UTF-8 SMTP encoding (Knowledge Base article 6839 point 2.2 ).

    I’m not aware of any logs that could indicate what emails have been sent, though there may be some activity logs in the server OS that could help I don’t think FileMaker provides anything. There are third party party network port monitoring tools, and I’m sure the SMTP server would have a log, not sure if gmail provides that sort of access though.

    The best course of action I think is to run some tests, send 50 emails to yourself and see how many get through, if they all do then maybe it’s safe to ignore FileMaker’s messages?

    Until FileMaker get this behviour fixed though, in the case of something mission critical I’d use s plugin
    http://www.cns.plug-ins.com/ do an excellent pop3 and SMTPit plugin
    http://www.dacons.net/ do a full email plugin (mail.it) that does both pop3 and smtp

    At the moment these are both a better choice than using FileMaker’s built in functionality, you’ll pay for the better quality so the decision is yours

    matthaughton

    May 23, 2009 at 3:32 pm

  4. I also found erratic behavior trying to use the Send Email script via/FM Advanced Server 10/FM ADV 10 DB.

    I called $ for support at Filemaker 3 times to find no solution.

    Removing the name field did not work for me.

    So by chance, I ran the script with Tools/Script Debugger on and it worked even using the name field. And now with Tools/Script Debugger off.

    It has been running for 3 days so far (fingers crossed) without error and send about 100 emails.

    Maybe someone else can give this a try.

    Best regards,
    Tim

    Tim Bates

    June 4, 2009 at 3:07 pm

  5. I’ve been trying to crack the bug. Because in some cases it does work.

    After some tryouts here I my findings using the SMTP Name field:

    WORKS
    Empty field
    Link to text globalfield in the same file
    Link to (global) calculationfield in the same file (calc: link to globalfield in the same file)

    DON’t WORK
    Link to text globalfield in external file
    Link to text field in the same file
    Link to text field in external file
    Link to calculationfield to external file

    Try and let me know.
    Hope to see this issue fixed soon.

    Rakesh

    July 1, 2009 at 2:28 pm

  6. Matt,

    I have been unable to solve this problem until your very clear and specific blog. Thank you!

    Paul

    Paul

    July 1, 2009 at 3:46 pm

  7. @Tim – Wow, that is odd behaviour, hope it’s still working for you.

    @Rakesh – Thanks for that detailed list of what you found, what operating system were those discoveries made on?

    @Paul – Thanks very much – I haven’t posted anything new in a while, my clients are taking up virtually every hour of the day at the moment, I’ve got loads more stuff about FM10 to come though.

    matthaughton

    July 1, 2009 at 5:45 pm

  8. Matt,

    It is still working fine.

    – works with IWP
    – works with FMP 10 internal client
    – works with FMP 10 external client on duplicate scripted with SMTP changed to their network.

    The name is a text field from the same DB.

    Tim Bates

    July 1, 2009 at 5:55 pm

  9. I’m using OS X.4.11

    Rakesh

    July 5, 2009 at 10:29 am

  10. I was having identical issue but in the end resolved the issue by selecting “Cram-MD5″ for authentication. Worked like a charm with and without SMTP Name in use.

    System: OS 10.5.7

    Todd Stewart

    July 31, 2009 at 2:27 pm

  11. That is odd and possibly a different issue, the problem I was referring to seemed to have something to do with utf-8 encoding (although that was just speculation). I didn’t think the encryption method would have any bearing – though that is useful to know.

    Also, the SMTP server may well only accept email using Cram-MD5, so emails would not send with it turned off (error 1506). While switching it on will seem to fix the problem it is actually just a simple case of having the correct settings for your SMTP server.

    matthaughton

    August 2, 2009 at 10:51 pm

  12. I am experiencing the same issue using FM 10 Advanced, IIS 6 SMTP Virtual server. Always works with NAME field blank. Will not work in any of the above suggested scenarios.

    Craig

    September 3, 2009 at 11:24 pm

  13. Same problem on windows and macs running 10v.2 server and latest client. Tried the tricks here with no luck and found that my old standby of the SMTPit plugin works. I am getting tired of Filemaker being run like Microsoft and not fixing things even after updates and producing a incomplete product.

    Will try again with it on the next product on Filemaker 11

    Aaron Beck

    September 21, 2009 at 11:01 pm

  14. My experience contradicts Rakesh’s report.

    The name field in my runtime solution is a global text field in the same file. However I get error 1506.

    I have not yet tried it yet with no name or with a name that has no spaces in it. But I will do that next and report on the results.

    Dennis Burnham

    September 22, 2009 at 3:11 am

  15. Same problem. It worked fine on an osx server running smtp, but when I switched to a windows smtp server, I had to remove the name before it accepted the message. Thanks for the contribution, Matt.

    Daniel Dean

    October 13, 2009 at 7:24 pm

  16. Thank you for working this out. It sure saved me a couple of hours trying workarounds, as I hate being unable to use a feature that promised to be so useful. The CNS plugins are fine and I have used them for years, but the elegance of simply filling in an smtp server seemed an unbeatable improvement.

    Not, alas. And I am surprised, to put it mildly, that Filemaker Inc has apparently let this problem linger on for the best part of a year.

    Christiaan van Minnen

    October 30, 2009 at 8:54 pm

  17. I would say the same thing that PAUL said: “I have been unable to solve this problem until your very clear and specific blog. Thank you!”

    (Thank you)

    Jamey Key

    June 16, 2010 at 4:33 pm

  18. Great work! I am really impressed.

    Filemaker application development

    September 20, 2010 at 9:59 pm

  19. I’ve run into this problem recently. I’m running FMP 11 Advanced and out of the 9 test emails I’ve sent, 1 of them reported error code 1506 but STILL WENT THROUGH. I have been populating the Name field with our company name and may resort to removing that.

    Lee Lukehart from SavvyData has posted a database file that might be helpful to anyone browsing through here:
    http://www.savvydata.com/resources/SMTP_SendMail_Interrogation.fp7

    In it, he states:
    *Note: A common cause of the 1506 error is related to the format of the email address carried by the To: parameter. While the Send via E-mail Client option lets you include the recipient’s name with the email address, only the address should be used with the Send via SMTP option. Thus, Full Name =BAD. The angle brackets will be rejected by most SMTP servers. Hopefully this single tip will resolve your persistent error 1506 troubles.

    I have been using only the email address; no name. So that hasn’t been my problem. I think the most frustrating part of this is the fact that we get an error code thrown, but the email still goes through. This kind of behavior is unacceptable, and if it was happening in FMP 10, it’s definitely still happening in FMP 11. It would be grand if FileMaker fixed some of these little bugs every once in a while. Lots of little bugs add up to big problems.

    -Matt

    HazMatt

    September 24, 2010 at 10:19 pm

  20. I am running FM 11 Adv on Mac OSX 10.6. and am trying to get smtp mail working. To make things as simple as possible, I created a button that runs a script that has my email address, smtp.gmail.com, port 25 or 465 … and almost every other combination. Without exception, my email does NOT GET SENT. I get “Email(s) could be sent successfully”.

    What am I missing? Thanks

    ron

    December 18, 2010 at 8:23 am

  21. I am also running FM 11 Adv on Mac OSX 10.6 and I can send mail just fine to two different smtp servers but a third one always gives me the “Email(s) could not be sent successfully” error. Got here by googling around. None of the “good” configurations reported by the SavvyData tool actually produce a successful sending of mail. The name field is definitely not the issue in this case. I don’t think there are any more possible smtp configurations left for me to try. Very aggravating. I wonder if the various email plugins (360 Works, Dacon MailIt etc.) will have this issue.

    joe s.

    July 26, 2011 at 7:47 pm

  22. The problem still exist. Could not get emails to go out period. I just got the same error code

    Emptying the name field has worked for me so far; keeping fingers crossed.

    Running Server 11 advanced with latest updates on a Windows 2008 box that is fully up to date and using an in house SMPT server.

    Made me crazy trying to get this to work and made me question everything about the FileMaker server and the mail server and stumble up the “fix” quite by accident. Now I am searching the web for answers and so it seems that this is a long standing bug with FMP.

    Not good.

    Bill~

    September 2, 2011 at 11:32 pm

  23. Stumbled by chance upon this site looking for something different. I have had the same problem. It was caused, by a script that generated the addresses from a list and put a comma-space between the addresses. The ‘too simple’ initial script also added a comma-space after the last address and I got the 1506 error. My new script takes out the last comma-space and now the E-mail is sent

    Must have something to do with some formats of addresses that are not accepted, strange but true

    Hope this helps

    EddyR

    November 1, 2011 at 1:26 pm

  24. I had the same problem. So I created a test script that tries to send 100 times the same e-mail from the same smtp server to the same recipient. What happened? 85 Times the e-mail was sent successfully, 10 Times the error 1506 occurred and 5 times even error 1501 (authentication failure) occurred. The errors raised every time after sending about 30 e-mails successfully. The script run in debug mode so I could create a break on error. After an error occurred, I waited a few minutes and placed the cursor one line back to retry to send exactly the same e-mail. What happened? No error!
    So nothing is wrong with semi colons, spaces, empty fields or what so ever. It has to do something with the connection or an overload of a queue.

    AeB

    November 14, 2011 at 3:39 pm

  25. Count me in – same error and inconsistent behavior (although mostly no go).

    FM Pro 11, FM Server 11, on Windows.

    Paul Haskell

    November 18, 2011 at 2:20 am

  26. I have FM Pro 11.03. I never have used the Name field. On SBS2003, were were getting periodic email errors. so I fixed this by adding an error capture (if last error > 1500) and a second SMTP email. However, when we migrated to Exchange 2010 / Server 2008, we began getting duplicate emails. I discovered the 2nd email was from my script. FM was throwing a 1506 error even though the email was successful and my error capture, picking up this error, then sent another email. Any suggestions? Oh, and I do not use full names for my email address, but do use a field from an external database for not only my email addresses, but all SMTP settings. However, the email only posts the error and sends the duplicate about 25% of the time.

    randy@upcli.com

    November 23, 2011 at 9:26 pm

  27. I am Running the FMP 11 Server Advanced on Win 2003 Server OS. Rarely SMPT sending works (with name field filled in) and most of the times I get error 1506. So there is inconsistent behavior.

    Frank Pinter

    January 31, 2012 at 12:42 pm

  28. I have the same problem with FM 11 Pro and FM Pro Adv. Mac OS-X Lion. The Test-Database worked fine, until I had an not valid address inside the mails. From then on, FileMaker refused sending Mails with error 1506. With copying data to a complt new database with the same scripts and layouts, things worked well. Some hours later, an empty field of mail produced an error, the same error occured after correction and is persistent!

    “Write on error a new database?” cannot be a serious solution, I think.

    Andrew Dietrich

    February 14, 2012 at 10:48 am

  29. Same problem here. Worked at first then with no change stopped working and throws error 1506.

    Moved to a different host, worked at first then failed and won’t work again, even on different smtp servers.

    Come on FM, please help.

    Phil

    February 25, 2012 at 7:32 pm

  30. I am getting a different error – I hope someone can help me with it. I have Filemaker 11 and use Portable Thunderbird for email (installed on USB external drive). I created a script to send email with a receipt of payment and for a while it worked. Then I had to reinstall everything and now it does not work. I am getting an error:

    There is no email program associated to perform the requested action. Please install email program or, if one is installed, create an association in the Default Programs control panel.

    The Default Programs control panel does show Thunderbird as default email. I am not aware of anything different in the system now compared with what I had before I had to reinstall both applications.

    Any ideas?

    Katarina

    July 7, 2012 at 3:58 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: