Sending E-mail

Fire_Chief

Well-known Member
Joined
Jun 21, 2003
Messages
691
Office Version
  1. 365
Platform
  1. Windows
I very much need to find a way to send email using CDO mail. I have been able to do it with Comcast and with Gmail.
I have tried for TWO weeks to find something that will work with Yahoo mail including code that Ron De Bruin wrote.
Nothing will work for yahoo mail. Please help me find a CDO program that will work.

I need someone much better at code than I am.

Thank You
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I find it hard to believe that in all of Mrexcel there is no one that can write a CDO routine to use with Yahoo mail.
I was able to do it with Gmail and Comcast but not with Yahoo.
 
Upvote 0
Thank you but when I pasted this in a module the entire sheet lit up red. Everything

I do appreciate you trying. No one else has

Thanks
 
Upvote 0
The quotes are wrong, try
VBA Code:
Sub email_using_Yahoo_VBA()

Dim myMail As CDO.Message

Set myMail = New CDO.Message

'Enable SSL Authentication
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True

'SMTP authentication Enabled

myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

'Set the SMTP server and port details

myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.yahoo.com”"

myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Set your username and password for your Yahoo Account

myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "fccin2000@yahoo.com”"

myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password”"

'Update all configuration fields
myMail.Configuration.Fields.Update

'Set the email properties

With myMail
.Subject = "Test Mail from Dr. takyar"""
.From = "fccin2000@yahoo.com"""
.To = "takyardinesh@gmail.com; takyar@exceltrainingvideos.com"""
.cc = "dinesh.takyar@gmail.com"""
.BCC = """"
.TextBody = "Welcome to MS Excel Training!"""
End With

myMail.Send
MsgBox ("Mail sent")

'Set myMail Variable to Nothing to free memory
Set myMail = Nothing

End Sub
 
Upvote 0
No mistakes in the code but it doesn't work.
Failed to connect. Same as every other codeI have tried.
 
Upvote 0
In that case, I'm afraid I cannot help. I don't have a Yahoo email account to test with.
 
Upvote 0
Try testncaa@yahoo.com ...... password = martin501 I made this up so I could test my codes.
It would be great if you continued to help?

Thanks Again
 
Upvote 0
I can't get it to connect either. In fact I can't even get outlook to connect.
I suggest you contact Yahoo & ask them.
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top