Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum
elettrolince

problems with thunderbird

Recommended Posts

elettrolince

Hi!

I'm having problems in sending email with Mozilla Thunderbird from a FM7 database.

On a MacOS X, when I perform the "send mail" script, it simply doesn't work...

nothing!

If I do the same thing on Windows XP, it works perfectly...

Thunderbird is the default mailer in each OS, and it sounds a bit strange that it doesn't recognize the send mail script only with Mac OSX.

 

I've tried as well with the OpenURL script, writing

"mailto:" & dbase::email_address

 

and it works...

But I could not populate it with BCC (I have to send mails with that option!).

I've read all the previous posts and threads, but I couldn't find any suitable solution...

 

Any hint?

 

Thanks a lot in advance!

Share this post


Link to post
Share on other sites
AHunter3

Open URL ["mailto:joeblow@domain.com?subject=the subject&cc=whoever@wherever.com&bcc=U2@youraddress.com&body=hello world"]

 

should work fine

Share this post


Link to post
Share on other sites
214Filemaker
Open URL ["mailto:joeblow@domain.com?subject=the subject&cc=whoever@wherever.com&bcc=U2@youraddress.com&body=hello world"]

 

should work fine

 

Of all the suggestions I've read, this was the first one that actually separated the body of the email into the body section of Thunderbird.

 

However, I can't get anything beyond the first few words to show up. How does one go about putting a relatively lengthy email into the body? i.e. has ampersands, paragraph markers, and database fields into the body?

 

I've tried what seems like every option I can think of in terms of moving quotations, etc...

 

My other issues seems to be that the script isn't consistently reading the "database::email" when placing the address in the bcc field.

 

oh wise AHunter3, can you assist me further?

Share this post


Link to post
Share on other sites
AHunter3

Some characters are illegal in mailto URLs and need to be avoided. The ampersand is one of them. When it comes to an ampersand it thinks the body part is OVER and that you're moving on to some other element of the URL. If you really really need to have ampersands WITHIN your email body, first define a variable $Amp as GetAs URLEncoded ("¶") and then use $Amp, I think that will work.

 

Open URL [Let (Qmk = """"; "mailto:joeblow@domain.com?subject=the subject&cc=whoever@wherever.com&bcc=U2@youraddress .com&body=hello world¶¶This is the second line of the email and "& YourTable::FirstName&", I want you to know that this is how you intersperse field values into the body¶¶As for quotation marks, " & Qmk & "enclosing phrases like this" & Qmk & ", use Let and define one as I did here then use Qmk wherever you want a quotation mark, OK?" ) ]

Share this post


Link to post
Share on other sites
214Filemaker

Boy...it's close.

 

The paragraph separation still doesn't seem to be working, though. I actually copied your script, changed to my database::field info and it came out like this:

 

"hello world This is the second line of the email and brian, I want you to know that this is how you intersperse field values into the body As for quotation marks, "enclosing phrases like this", use Let and define one as I did here then use Qmk wherever you want a quotation mark, OK?"

 

I'm (for the most part) following what's going on here...it just doesn't seem to quite be working.

 

Eventually, assuming I can get this to work, I'll be putting a loop at the end to process the script through a found set.

 

I appreciate your timely response AHunter3. I look forward to you helping me solve the mystery...though not quite as much as I look forward to FM being able to simply integrate with Thunderbird.

 

Some characters are illegal in mailto URLs and need to be avoided. The ampersand is one of them. When it comes to an ampersand it thinks the body part is OVER and that you're moving on to some other element of the URL. If you really really need to have ampersands WITHIN your email body, first define a variable $Amp as GetAs URLEncoded ("¶") and then use $Amp, I think that will work.

 

Open URL [Let (Qmk = """"; "mailto:joeblow@domain.com?subject=the subject&cc=whoever@wherever.com&bcc=U2@youraddress .com&body=hello world¶¶This is the second line of the email and "& YourTable::FirstName&", I want you to know that this is how you intersperse field values into the body¶¶As for quotation marks, " & Qmk & "enclosing phrases like this" & Qmk & ", use Let and define one as I did here then use Qmk wherever you want a quotation mark, OK?" ) ]

Share this post


Link to post
Share on other sites
AHunter3

Odd.

 

You are on a Mac, right? Getting hard returns within a mailto URL to work appropriately can be a bit messier under Windows (different line endings) but should just work on a Mac.

 

OK let me futz with Thunderbird / Mac and see if I get the same results you did. I'm a diehard Eudora person myself and it definitely "just works" under Eudora.

Share this post


Link to post
Share on other sites
214Filemaker

yes, I'm on a mac.

 

I look forward to hearing any solution you may come up with.

 

if it makes any difference to you, this is the body of the email (I tried getting rid of all the quotes, etc...) :

 

 

"Greetings Person!" & ¶

& ¶ & ¶

& ¶ &

"wow, am I excited to finally be mailing you guys. If you had any idea how hard it was for me to generate this email, you'd all be shocked." & ¶ & ¶ & ¶ &

 

 

"three lines, one paragraph." & ¶ & ¶ &

 

"three lines worth of text here, but one paragraph." & ¶ & ¶ &

"blah blah blah, see below to confirm you address, blah blah blah" & ¶ & ¶ &

 

"This is just more blah blah blahing." & ¶ & ¶ &

"blahblahblah" & ¶ & ¶ & ¶ &

 

 

"Thanks for your time, blah blah blah!" & ¶ & ¶ &

 

"Your posters will be sent to:" & ¶ &

"database::FirstName" & " " & "database::LastName" & ¶ &

"database::street address" & ¶ &

"database::City, " & "database::State" & "database::Zipcode" & ¶ & ¶ & ¶ &

 

 

"Cheers," & ¶ &

"D" & ¶ &

"d@website.com"

 

 

 

Odd.

 

You are on a Mac, right? Getting hard returns within a mailto URL to work appropriately can be a bit messier under Windows (different line endings) but should just work on a Mac.

 

OK let me futz with Thunderbird / Mac and see if I get the same results you did. I'm a diehard Eudora person myself and it definitely "just works" under Eudora.

Share this post


Link to post
Share on other sites
AHunter3

Well, it generates this in Eudora (copied and pasted out of the resulting Eudora outbound email msg_:

 

Greetings Person!

 

 

 

wow, am I excited to finally be mailing you guys. If you had any idea how hard it was for me to generate this email, you'd all be shocked.

 

 

three lines, one paragraph.

 

three lines worth of text here, but one paragraph.

 

blah blah blah, see below to confirm you address, blah blah blah

 

This is just more blah blah blahing.

 

blahblahblah

 

 

Thanks for your time, blah blah blah!

 

Your posters will be sent to:

database::FirstName database::LastName

database::street address

database::City, database::Statedatabase::Zipcode

 

 

Cheers,

D

d@website.com

 

 

Now hang on and I'll temporarily designate the 'Bird as my chosen email app.

 

ETA: OK I did so and it generated the exact same email, hard returns included, in Thunderbird.

 

How about you post your real mailto URL code? The above is obviously a mockup.

Share this post


Link to post
Share on other sites
214Filemaker

all this time spent, I could have hand typed all 170 emails...

Share this post


Link to post
Share on other sites
AHunter3

Here's a typo:

 

&&bcc=

 

should only be one ampersand there within the mailto URL itself.

 

Once I changed that to a single ampersand, your test works fine:

 

hello world

 

This is the second line of the email and Street Team::First Name, I want you to know that this is how you intersperse field values into the body

 

As for quotation marks, "enclosing phrases like this", use Let and define one as I did here then use Qmk wherever you want a quotation mark, OK

 

(I put "Street Team::First Name" in quotes rather than aiming it at an actual field at that point, in case that's not obvious).

 

 

Your DESIRED email text works, also; in this case you yourself have your fully-qualified field names in quotation marks, and you won't want them to be since you want the actual streetteam::FirstName (and so forth) to appear, not the literal string "streetteam::FirstName" as you have it here.

 

Greetings Festivarian!

 

 

 

It's that time of year again. The time of year when I reach out to our incredible Festivarian community and ask for help promoting the Telluride Bluegrass Festival in your area.

 

 

This note will be brief, as my intention is to see if you are still interested in helping us in our mission of distributing posters to local businesses and spreading the excitement that is the Telluride Bluegrass Festival.

 

If you do not wish to help, please reply to this message with a note stating so, and I'll gladly remove you from the list. If you do want to have some posters sent your way please double check your address below.

 

Assuming the address is correct, there is no need to do anything but wait for your posters. If there is a problem, simply reply with your current address.

 

It would be fantastic to know if you would like some handbills (small hand sized posters) to use in your travels as well.

 

I'll be sending out a letter and some posters next week.

 

 

Thanks for your time, and I hope to see many of you in June!

 

Your posters will be sent to:

streetteam::FirstName streetteam::LastName

streetteam::StreetAddress

streetteam::City, streetteam::Statestreetteam::Zipcode

 

 

Cheers,

Dustin

dxxxx@bxxxxxx.com

Share this post


Link to post
Share on other sites
214Filemaker

I really wish this would have worked out...

Share this post


Link to post
Share on other sites
AHunter3

If you join up as a full member you can post a clone of your actual database file for me to look at. (posting file attachments is a privilege of full membership here).

 

Hmm, question: what happens if you download and try A DIFFERENT EMAIL PROGRAM? That would at least eliminate the possibility that it is a Thunderbird 3.0.4-specific bug of some sort.

Share this post


Link to post
Share on other sites
214Filemaker

full member isn't an option, but I appreciate the thought.

 

Would you do me one last favor and delete my email from the previous posts so that bots don't crawl all over me?

 

Thanks for all of your help.

 

If you join up as a full member you can post a clone of your actual database file for me to look at. (posting file attachments is a privilege of full membership here).

 

Hmm, question: what happens if you download and try A DIFFERENT EMAIL PROGRAM? That would at least eliminate the possibility that it is a Thunderbird 3.0.4-specific bug of some sort.

Share this post


Link to post
Share on other sites
AHunter3

Did where I could find it. If I missed any, pleae point them out.

Share this post


Link to post
Share on other sites
chrisdragon

I had the same problem with Thunderbird 3.1.9 on OSX 10.6.6. The "Send Mail" script step actually froze FileMaker and I had to force close. Next time I tried it, it said "Some of the files that are needed are either damaged or have not been installed. please run the installer to correct this problem."

 

So I tried the Open URL script step and couldn't get newlines to pass through to the body. A couple times I got one line break to work by manually adding a "¶" character in the URL string, but then that stopped working as well! I don't understand that, but I did finally get it to work consistently by replacing ¶ (which is equivalent to Char(13) known as "carriage return") with Char(10) (known as "line feed"). I created this custom function:

 

URLEncode(str) [

Substitute(

Substitute(str; "¶"; Char(10) );

"&"; "&"

)

]

 

and then the email can be sent like this:

Open Url [

"mailto:" & URLEncode($to) & "?subject=" & URLEncode($subject)

& "&body=" & URLEncode($body)

]

 

Too bad you can't include the "from" address with that syntax...

Share this post


Link to post
Share on other sites
chrisdragon

URLEncode(str) [

Substitute(

Substitute(str; "¶"; Char(10) );

"&"; "&"

)

 

Ooops, the above doesn't work for including ampersands (&) in the email body in Mac FileMaker 11. I tried all sorts of ways to make that work and the only thing that actually did work was to use a Web Viewer to display the "mailto" URL instead of using the "Open URL" script step. I'm not sure how web viewer decides what '&' characters represent new parameters and what should be URL encoded as %26, but maybe it recognizes the '&abc=' sequence as a parameter and URL encodes everything else.

 

So I now put my mailto URL into a $$variable (along with the newline to char(10) replacements) and have a web viewer on a layout that displays the $$variable and I switch to that layout followed by a pause of 1 second to make the email send. Pretty hacky.

Share this post


Link to post
Share on other sites
computerix

Hope this might still be helpful to someone (infact I registered just to write this):

 

After hours and hours of trying to find a way to pass ampersand (&) from filemaker 11 to thunderbird 17 on a mac 10.6.8 this is the only solution that worked for me:

 

1. Use regular "Open URL" script step or go to layout with web viewer (both works).

2. Build the mailto url like this:

 

Replace (

"mailto:" & 

GetAsURLEncoded ( $to )

& "?"

&

"&cc=" & GetAsURLEncoded ( $cc ) &
"&bcc=" & GetAsURLEncoded ( $bcc ) &
"&subject=" & GetAsURLEncoded ( $subject ) &
"&body=" & GetAsURLEncoded ( Replace ( $body ; "¶" ; Char(10) ) ) &
"&attachment=" & GetAsURLEncoded ( $attachment )


; "?&" ; "?" )

 

Mailto url can be passed to "Open URL" script step or web viewer field as a variable.

 

Cheers!

Share this post


Link to post
Share on other sites
computerix

Correction: Only works with "Open URL" script step, NOT web viewer !

Share this post


Link to post
Share on other sites
computerix

Apparantly, there is no easy way to set the from account.

 

This applescript is my workaround. It sends keystrokes to thunderbird:

tell application "FileMaker Pro Advanced"

set StepsToDesiredAccount to cell "global variable with steps to desired account" of table "nameoftable" of database "nameofdatabase" -- optional, in case of several from accounts

tell application "System Events"

	tell process "Thunderbird"

		set frontmost to true
		delay 0.5
		key code {97} -- 97=F6 activates "from" drop down list
		delay 1
		keystroke "a" -- first letter of anchor account to have a defined account to start moving down or up from, in this case "a" for "anchor"
		delay 0.2
		key code {49} -- show drop down list 49=space
		if StepsToDesiredAccount is not "0" then
			repeat StepsToDesiredAccount times
				key code {125} -- arrow down
			end repeat
			key code {52} -- enter
		end if

	end tell

end tell	
end tell

 

Experiment with the delays. Increase with slow machine.

Share this post


Link to post
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use