Jump to content
Server Maintenance This Week. ×

Send Mail not working


MikeKD

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

Recommended Posts

Hi Folks,

I have a portal of players involved in a gig. That works fine.

I have a button on the layout to email all the players using my email client (Apple Mail).

Clicking the button opens Mail with the appropriate subject title, but there are no recipients in the "To" of it.

I've set it to send to emails from the HomeEmail field and CC to the WorkEmail field (in the same table that players come from.)

 

Is Apple Mail incompatible or is there something else I'm doing wrong?

 

Cheers!

Mike

 

 

Link to comment
Share on other sites

Hi Mike, you need to collect the addresses from the portal, store them into a variable and then address the email to that variable.

 

In your script go to the first portal row, start a loop, set a variable that contains the email address field from your database

Go To Portal Row[Select First]
Loop
     Set Variable[$addresses; Value: List ( $addresses ; db::email )]
     Go To Portal Row [Select; Next; Exit after last]
End Loop

Then Send Email and use the variable $addresses in the email setup as the TO address.

email_LOOP.fp7.zip

  • Like 1
Link to comment
Share on other sites

Glad I could help.  Someone helped me with a similar problem just the other day. 

 

Just a note for anyone trying to do this with a different email program. You may run into problems with the separator between email addresses.  Mail.app can work with a list such as this with no separator, other programs (Outlook, etc.,) may require a comma or colon to separate the addresses. In that case use Substitute to change the carriage returns to the separator you require.  

  • Like 1
Link to comment
Share on other sites

Hmm, I seem to have broken it but can't see what I've done wrong!

It's looping just over on name in the middle of the portal and attaching the PDF in an email to them - named 16 times in the To of the email.

Here's my script:

 

 

Go to Layout [ “Gig Details” (Set_List) ]

Save Records as PDF [ File Name: “file:BIG BAND/GigInfoPDF/CurrentGigInfo.pdf”; Records being browsed ]
[
Document - Compatibility: Acrobat 5 and later ]
[
Pages - 1; Include: All pages ]
[
Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ] [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]

Go to Portal Row

[ Select; First ]

Loop

Set Variable [ $addresses; Value:List ( $addresses ; Players::EmailHome ) ]

Go to Portal Row

[ Select; Next; Exit after last ]

End Loop

Send Mail [ Send via E-mail Client; To: $addresses; Subject: "Swingamajig: "& Set_List::Gig Name &" - "& Set_List::Date; Message: "Dear Folks," & ¶ & "here are some details of our next gig:" & ¶ &
Set_List::Gig Name & ¶ &
"Date: " & Set_List::Date & ¶ &

"Venue: " & Set_List::Venue & ¶ &
"Postcode: " & Set_List::GigPostcode & ¶ &
"Notes: " & Set_List::Gig Notes:; Attachment: “file:BIG BAND/GigInfoPDF/CurrentGigInfo.pdf” ]

Link to comment
Share on other sites

There's no need for a loop here (unless the portal is filtered, that is). You can replace the block from Go to Portal Row down to (and including) End Loop with Set Variable [ $addresses; Value:List ( Players::EmailHome ) ]

Link to comment
Share on other sites

Thanks Rio,

I've just tried that, but it only finds one address (the same one as before), but this time only once!!)

Not sure why that address gets chosen!

Cheers,

Mike

Link to comment
Share on other sites

Hi Folks,

It now works, but I'm not sure why!!

 

I put

Substitute ( List ( Players::EmailHome ) ; "¶" ; ";" )

 

in the TO: field of the write email and didn't set a variable at all. (found this in the knowledge base).

 

Cheers!

Mike

Link to comment
Share on other sites

This topic is 3942 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.