PDA

View Full Version : gmail send mail with noreply



wilg
11-04-2012, 01:53 PM
Hi , looking to modify this send mail through gmail to show from "noreply" vs showing my gmail username.

Sub Send_Gmail_Email()
Dim html, message As String
'Add the Project Reference Microsoft CDO WINDOWS FOR 2000
Dim lobj_cdomsg As CDO.message
Set lobj_cdomsg = New CDO.message
'message = "Hello!"
'html = "<html><body><h2><font color=#FF0000>Hello!</font></h2></body></html>"
'begin emailmsg
emailmsg = emailmsg & "hi"
With lobj_cdomsg.Configuration
.Fields(cdoSMTPServer) = "smtp.gmail.com"
.Fields(cdoSMTPConnectionTimeout) = 60
.Fields(cdoSendUsingMethod) = cdoSendUsingPort
.Fields(cdoSMTPServerPort) = 465
.Fields(cdoSMTPAuthenticate) = True
.Fields(cdoSMTPUseSSL) = True
.Fields(cdoSendUserName) = "yourgmail@gmail.com"
.Fields(cdoSendPassword) = "password"
lobj_cdomsg.To = "someone@gmail.com
lobj_cdomsg.BCC = ""
lobj_cdomsg.From = "someone" ' this shows 'someone' yourgmail@gmail.com
lobj_cdomsg.Subject = "hello"
lobj_cdomsg.TextBody = message
lobj_cdomsg.HTMLBody = emailmsg
'lobj_cdomsg.AddAttachment ("c:\test.txt")
.Fields.Update
lobj_cdomsg.send
End With
Set lobj_cdomsg = Nothing
End Sub

lynnnow
11-04-2012, 10:51 PM
One way to do this would be to create a "noreply" email ID on gmail and set a forwarding rule for all false positives to your personal email ID.

HTH

wilg
11-06-2012, 05:46 AM
My work domain does have a noreply email address which in javascript i am able to bounce off it with not using anything but my own profile and passwords.
I just do not know how to configure for vba...any other suggestions?

wilg
11-06-2012, 06:50 AM
My work domain does have a noreply email address which in javascript i am able to bounce off it with not using anything but my own profile and passwords.
I just do not know how to configure for vba...any other suggestions?

Kenneth Hobs
11-06-2012, 09:06 AM
I don't know of a way to hide your gmail name.

Of course you can change the automatic ReplyTo field though they can still reply if you know your gmail name and gmail.com domain or look at the details of your email.

lobj_cdomsg.ReplyTo = "noreply@nowhere.com"