Norbert
It looks like you are using Outlook Redemption. I think the object has a "From" property, but I'm not sure. That would let you specify the sending account. I don't know about a flag that would indicate the email was sent. I suggest you contact the vendor.
Another option would be to use vbMAPI from EverythingAccess.com . That's the one I use. It is very versatile and the site has an extremely good help section with examples for just about anything. The good thing about vbMAPI is that you don't have to register any DLLs or install anything other than on the developing computer. It inserts class modules into your project. Redemption requires you to register its DLL on every machine that uses it.
Regards,
Bill
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, August 06, 2015 6:03 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Verify email was sent via MSAccess 2013 to Outlook 2013/Email sent from different account (not default)
From the following code will send an email from an Access form to Outlook:
Private Sub cmdEmail_Click()
Me.txtccemail = "mfc@msn.com"
Me.txtemail = "drnorbert@msn.com"
Set objOL = New Outlook.Application
Set objNS = objOL.GetNamespace("MAPI")
objNS.Logon
Set objOItem = objOL.CreateItem(olMailItem)
Set objSafeItem = CreateObject("Redemption.SafeMailItem")
objSafeItem.Item = objOItem 'set Item property
objSafeItem.Recipients.Add Me.txtemail
If Len(strCC) > 0 Then
objSafeItem.Recipients.AddEx strCC, Me.txtccemail, "SMTP", olCC
End If
objSafeItem.Recipients.ResolveAll
objSafeItem.Subject = Me.txtSubject
objSafeItem.Body = Me.txtMessage & vbCrLf & vbCrLf & Me.txtSignature
objSafeItem.Attachments.Add Me.txtFile
objSafeItem.Send
Me.txtSent.Visible = True
Me.txtSent = "REPORT(s) emailed...."
End Sub
Question:
1-Can a flag from Outlook be sent to Access which verifies that the email was sent?
2-Can the email be send from a selecting a different account (not the default account)?
Thanks
Norbert
Posted by: "Bill Mosca" <wrmosca@comcast.net>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar