473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sending email from Access to multiple users

22
hi,
i'm a bit stuck here in sending emails to multiple users which i need to read from a database. With codes below, i able only to send 2 recipients. any idea how to send to multiple users?

thx
Expand|Select|Wrap|Line Numbers
  1. strSubject = "Test Memo sent at" & Now()
  2.  
  3. strDest = "email"
  4. strCopy = "copy_email"
  5.  
  6.  
  7.  
  8. Set Session = CreateObject("Notes.NotesSession")  ' Creates a Notes  Session
  9. Server$ = Session.GETENVIRONMENTSTRING("MailServer", True)    ' Read the current mail server from Notes.ini
  10. Mailfile$ = Session.GETENVIRONMENTSTRING("MailFile", True)    ' Read the current mail file from Notes.ini
  11. Set DB = Session.GETDATABASE(Server$, Mailfile$)  ' Try to open the mail Database
  12.  
  13. If Not DB.IsOpen Then
  14. MsgBox "Could not access Notes mail file!"    ' If Mail db not accessible, return an error
  15. Exit Sub
  16. End If
  17.  
  18.  
  19. Set Memo = DB.CREATEDOCUMENT                      'Create a memo in the User 's mail file
  20. Memo.Form = "Memo"                                'Set the form to be a mail Memo
  21. Memo.from = Session.username                      'Set the from field (not necessary)
  22. Memo.sendto = strDest                             'Set the recipient of the Memo
  23. Memo.copyto = strCopy
  24. Memo.subject = strSubject                         'Give the memo a subject
  25.  
  26.  
  27. Set Item = Memo.CREATERICHTEXTITEM("Body")
  28. 'Call Item.EMBEDOBJECT(1454, "", strFilename)      'Go to the body of the memo and embed the attachement
  29. Call Memo.Save(True, False)                       'Save the memo in drafts
  30. Call Memo.send(False, False)                      'Send the memo
  31.  
  32.  
  33. Set Memo = Nothing
  34. Set DB = Nothing
  35. Set Session = Nothing
  36.  
  37.  
  38. MsgBox "Attachment sent. You may close Notes."
Jun 6 '08 #1
0 1478

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Del | last post by:
I have two question on sending email messages from MS Access (Versio 2000, 2002, and 2003). I have a form with a command button to send an email message, the code behide the button is as follows;...
2
by: kimberly.shaffer | last post by:
Okay, I can automate sending of multiple emails with records using Groupwise and Access DB. But now what I need to do is send multiple fields associated with one field out automatically and can't...
1
by: vijoker | last post by:
I created a form in Access 2000 where upon choosing a person from a drown down and clicking a button would display everyone who reports to the person and send the person an email to verify...
17
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
6
by: Robert Pettersson | last post by:
Hi, I have built an webapp in C# that uses SMTPMail to send mail to users. When I installed it on the prodserver everything worked fine for me, but the users can not send mail. They get Access...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
5
by: Jai | last post by:
Hi, I am in a problem of sending mass emails(newsletter) to my website members. Actually my problem is this: I want to send newsletter to my website members. But I had given a facility for...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.