Jump to content
Server Maintenance This Week. ×

SMTP info from many records in one email?


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

Recommended Posts

Is there a way to send information from many records in one email using SMTP? I thought about a global repeating field or something like that. Is there a way to script a process that copies information into a global repeating, then adds another record's information into another global, groups them together back into one global repeating, and so on...I want to be able to send a list through email but don't want to send separate emails for each record. Yuck!

Any thoughts or suggestions would be appreciated!

Marcelle

Link to comment
Share on other sites

How many fields?

You could script a loop process, by putting the necessary fields on a layout and then using a global field to hold the email information, and one to tell which is the starting field (If using the more automated process).

gHoldEmailBody (Global text)

gStartField (Global text)

Lets say you have three fields on this layout, the first being Name, then address and telephone

Something like; (once you have the records found)

If you don't have too many fields and you need a specific format, then.

Go To Record/Request/Page [First]

Set Field [gStartField, Name]

Loop

Set Field [gHoldEmailBody, "Name: " & Name ]

Set Field [gHoldEmailBody, gHoldEmailBody & ":PP" & "Address: " & Address]

Set Field [gHoldEmailBody, gHoldEmailBody & ":PP" & "Telephone: " & Telephone ]

Go To Record/Request/Page [Next, Exit After Last]

End Loop

---Code your SMTP functions here---

For a more automated (Yet not so much choice on the output)

Go To Record/Request/Page [First]

Set Field [gStartField, Name]

Loop

Go To Field [Name]

Loop

Set Field [gHoldEmailBody, gHoldEmailBody & ":PP" & Status(CurrentFieldContents)

Go To Next Field

Exit Loop If (Status(CurrentFieldName) = "Name"

End Loop

Go To Record/Request/Page [Next, Exit After Last]

End Loop

---Code your SMTP functions here---

HTH

Link to comment
Share on other sites

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