PDA

Click to See Complete Forum and Search --> : Access email send


Matt_T_hat
Apr 8th, 2004, 08:45 AM
I have a client that I have just helped move a list of 450 email addresses into a database.

They now need to send emails to these people to let them know what is going on.

What would be the best way for me to do this.

If code is involved snippits would be great.

The database has one table with one field in it.

salvelinus
Apr 9th, 2004, 03:20 PM
You mean you don't want to do it manually?? ;)
You could select all the addresses into a recordset, then loop through them.
In the loop, use DoCmd.SendObject to send them all an email, inserting their address in the relevant spot, using acSendNoObject for the object.

For i = 0 to rs.RecordCount - 1
strEmail = rs!i
DoCmd.SendObject acSendNoObject, , , strEmail, , , "Big News Subject", "My Message", True
Next

Look up SendObject in help if you want to know all the arguments.

Matt_T_hat
Apr 10th, 2004, 02:07 AM
Originally posted by salvelinus
You mean you don't want to do it manually?? ;)
You could select all the addresses into a recordset, then loop through them.
In the loop, use DoCmd.SendObject to send them all an email, inserting their address in the relevant spot, using acSendNoObject for the object.
That is a brillient start. Thankyou. Is there any way to use a template email?

I'm gonna look up SendObject in the mean time.

salvelinus
Apr 10th, 2004, 10:40 AM
What do you mean by a template email? Same subject & body?
Just put it in a string or constant variable and include that where the subject & body go.
If they have to be somewhat personalized, like a mail merge, build them in the loop.