Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2021 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Short question - Is there a way to change the Content-Transfer-Encoding when setting the body of an email?

Back story - Every week we send an email blast to our folks which is an HTML eCard provided by our podcast provider (VoiceAmerica). We get the eCard as a text file with the HTML code, open the file and put the code into a field. We use EmailSetBody to attach the field to the email as HTML.

For almost everyone of the 11,000+ who receive the eCard it opens just fine. But for folks with a gmail.com address, who are using the Gmail web interface, or the iOS Gmail app, the body of the message does not display. Downloading the message as a .eml shows that the HTML is in the message. Open the message with any non-google email reader and the HTML shows just fine.

If VoiceAmerica sends the message, Google readers show it just fine. But VoiceAmerica is sending both the text and HTML sections with the content base64 encoded, with the header Content-Transfer-Encoding: base64.

I can get the fields base64 encoded, but how do I set the Content-Transfer-Encoding header to base64?

Dave

Edited by Dave Vaklyes
typo
Posted

Hi Dave,

If you need to set a header for an email you can use the function EmailSetHeader . It takes the name of the header and the value of that header as parameters. So in your case the function call would like this:

Quote

EmailSetHeader("Content-transfer-encoding";"base64")

Try that and see if it resolves the issue. I would also make sure setting this header doesn't change the appearance of the email for non-gmail recipients. 

  • Like 1
Posted (edited)

I tried the EmailSetHeader, but couldn't get it to work.

Then I had a "Doh" moment when I realized that by setting that header the plugin does the base64 encoding. 

So I removed my base64 encode, and now it still doesn't work. The value of Content-transfer-encoding is not getting set.

My code sequence is:

Set Variable [ $resultSetup ; Value: EmailConnectSMTP( "email.XXXXXXXXXXXXXX.com:465"; "[email protected]" ; "XXXXXXXXXXXXXXXXXXXXXXX" ; "forceTrust=1" ;"ssl=1" ) ] 
Set Variable [ $result ; Value: EmailCreate( "[email protected]" ; $email ; MailingBlasts for MCC::blastSubject ) ] 
Set Variable [ $result ; Value: EmailSetHeader( "reply-to" ; "[email protected]" ) ] 
Set Variable [ $result ; Value: EmailSetBody( $TEXT; "plain" ) ] 
Set Variable [ $result ; Value: EmailSetHeader( "Content-transfer-encoding" ; "base64" ) ] 
Set Variable [ $result ; Value: EmailSetBody( $HTML; "html" ) ] 
Set Variable [ $result ; Value: EmailSetHeader( "Content-transfer-encoding" ; "base64" ) ] 
Set Variable [ $result ; Value: EmailSend ] 
Set Variable [ $emailResult ; Value: EmailLastError ] 
Set Variable [ $result ; Value: EmailDisconnect ] 

Also tried it with "Content-Transfer-Encoding" if case-sensitivity was an issue. And with the EmailSetHeader before the EmailSetBody.

Thoughts?

Dave

 

Edited by Dave Vaklyes
More information
Posted

Yes, they are.

In the text section: Content-Transfer-Encoding: quoted-printable

In the HTML section: Content-Transfer-Encoding: 7bit

So something is not working.

I attached the script steps I'm using to test this with. I am using plugin version 3.1, on FileMaker 17 (and higher). Same result on both FM Versions.

Dvaklyes-email-script.txt

Posted

Thats odd that it is not setting the header to the value you are passing it. Can you email me the txt file with the HTML in it? I would like to do some testing with it. Let's go ahead and get you an official support case. Send the txt file to [email protected] and just leave a link to this thread and attn Ryan in the body of the email. 

This topic is 2021 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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