G
Guest
Hi
I was wondering if it is possible to specify an SMTP account/service when
automating mail through Outlook using Access 2000. Most mail will be sent
via the default Microsoft Exchange server, but there are certain emails which
need to be routed through internet mail. I am using the standard code:
Function SendMessage(stAddr As String, stSubj As String, stBody As String,
Optional stCC As String, Optional stBCC As String, Optional AttachmentPath As
String) As Boolean
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(stRec)
objOutlookRecip.type = olTo
Set objOutlookAttach = .Attachments.Add(stPath)
......(etc)
.Send
End with
I can't see any place to specify the SMTP server - any ideas?
Many thanks.
I was wondering if it is possible to specify an SMTP account/service when
automating mail through Outlook using Access 2000. Most mail will be sent
via the default Microsoft Exchange server, but there are certain emails which
need to be routed through internet mail. I am using the standard code:
Function SendMessage(stAddr As String, stSubj As String, stBody As String,
Optional stCC As String, Optional stBCC As String, Optional AttachmentPath As
String) As Boolean
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(stRec)
objOutlookRecip.type = olTo
Set objOutlookAttach = .Attachments.Add(stPath)
......(etc)
.Send
End with
I can't see any place to specify the SMTP server - any ideas?
Many thanks.