MikeAuz1979
Programmer
Hi,
Using Access 2000 and Outlook 2003 I'm automatically sending emails using the below code which sets the reply to address if the recipient replies to the email.
This works fine but what I'm finding is some unhelpful recipients are replying to the email and replacing the correct reply address with my address. (As I am the sender)
Any idea if I can lock down the reply to so that when the recipient hits reply they can't change the address?
Thanks for any help
Mike
---Code Start (Assembled from various help sources)---
Sub SendMail(Recip, ccRecip, ReplyTo, Freq, Con As Boolean, CustName, SaveFile)
'- Requires free program Advanced Security for Outlook installed on the reporting PC.
'- Available at '- First time you run this, just select 'Allow' and tick 'Always perform this action'
Dim subject, bodytext As String
Dim objOutlook, olMailItem, objEMail As Variant
subject = Freq & " Consumption Information for " & CustName
If Con = True Then
bodytext = "Please find attached your consumption information." & vbCrLf & "If you have any queries please simply reply to this email."
Else
bodytext = "Please note you have no recorded consumption for this period." & vbCrLf & "If you have any queries please simply reply to this email."
End If
Set objOutlook = CreateObject("outlook.application")
Set objEMail = objOutlook.CreateItem(olMailItem)
With objEMail
.To = Recip
.cc = ccRecip
.subject = subject
.body = bodytext
.ReplyRecipientNames = ReplyTo
If Not IsEmpty(SaveFile) Then
.Attachments.Add SaveFile
End If
.Save
.send
End With
Set objOutlook = Nothing
Set objEMail = Nothing
End Sub
---Code End---
Using Access 2000 and Outlook 2003 I'm automatically sending emails using the below code which sets the reply to address if the recipient replies to the email.
This works fine but what I'm finding is some unhelpful recipients are replying to the email and replacing the correct reply address with my address. (As I am the sender)
Any idea if I can lock down the reply to so that when the recipient hits reply they can't change the address?
Thanks for any help
Mike
---Code Start (Assembled from various help sources)---
Sub SendMail(Recip, ccRecip, ReplyTo, Freq, Con As Boolean, CustName, SaveFile)
'- Requires free program Advanced Security for Outlook installed on the reporting PC.
'- Available at '- First time you run this, just select 'Allow' and tick 'Always perform this action'
Dim subject, bodytext As String
Dim objOutlook, olMailItem, objEMail As Variant
subject = Freq & " Consumption Information for " & CustName
If Con = True Then
bodytext = "Please find attached your consumption information." & vbCrLf & "If you have any queries please simply reply to this email."
Else
bodytext = "Please note you have no recorded consumption for this period." & vbCrLf & "If you have any queries please simply reply to this email."
End If
Set objOutlook = CreateObject("outlook.application")
Set objEMail = objOutlook.CreateItem(olMailItem)
With objEMail
.To = Recip
.cc = ccRecip
.subject = subject
.body = bodytext
.ReplyRecipientNames = ReplyTo
If Not IsEmpty(SaveFile) Then
.Attachments.Add SaveFile
End If
.Save
.send
End With
Set objOutlook = Nothing
Set objEMail = Nothing
End Sub
---Code End---