Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
 To: Simon Arnold
  Where is Simon Arnold?
 Halifax
 United Kingdom
 Simon Arnold
 Tags
Subject: RE: Send Email Using Yahoo SMTP Server
Thread ID: 148847 Message ID: 149111 # Views: 29 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Monday, October 22, 2007 6:03:11 AM         
   


> > Hi All
> >
> > I want to send email by using CDO + SMTP.
> > I am able to send email by using gmail,indiatimes,hotmail.
> > But When I tried to send using Yahoo SMTP server, got message
> > "Message can not be sent to smtp server, server response was not available".
> >
> > Here is the code

> >
> > LOCAL loConfig AS CDO.Configuration, loFlds AS Object, loMsg AS CDO.Message
> >
> > loConfig = CREATEOBJECT("CDO.Configuration")
> > loFlds = loConfig.Fields
> >
> > WITH loFlds
> > *- Set the CDOSYS configuration fields to use port 25 on the SMTP server.
> > .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
> >
> > *- Enter name or IP address of remote SMTP server.
> > .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.yahoo.com"
> > .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
> >
> > *- Assign timeout in seconds
> > .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 20
> > .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = .t.
> > .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
> > .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="password"
> > .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
> >
> > .Update()
> > ENDWITH
> >
> > *- Create and send the message.
> > loMsg = CREATEOBJECT("CDO.Message")
> > WITH loMsg
> >
> > .Configuration = loConfig
> > .To = "sur200@indiatimes.com"
> > .From = "username@yahoo.com"
> > .Subject = "This is a test of CDO sending e-mail"
> > .HTMLBody = "This is the HTML content of the mail message"
> >
> >
> > TRY
> > .Send()
> > MESSAGEBOX("Email Sent Successfully")
> > CATCH TO oerr
> > MESSAGEBOX(SUBSTR(oerr.message,AT(":",oerr.message)+1,LEN(oerr.message)))
> > ENDTRY
> > ENDWITH
> >
> > Thanks for help in advance.
> >
> >
> > Surinder Singh
>
> This might be down to the account type on Yahoo, they have different mail accounts, the basic does not allow you to use Outlook or Outlook express, you have WebMail only, so you can only log into the Yahoo site and access mail from there, it would be worth checking this out first.
>
>
> Simon Arnold.
> To get back my youth I would do anything in the world, except take exercise, get up early, or be respectable. Oscar Wilde (1854 - 1900)

Ok, I'll try to find some alternate solution for this.
Thanks

Surinder Singh




COMPLETE THREAD

Tip: click here to scan for Windows Registry Errors and Optimize PC performance
Send Email Using Yahoo SMTP Server Posted by surinder singh @ 10/18/2007 9:05:15 AM
RE: Send Email Using Yahoo SMTP Server Posted by Simon Arnold @ 10/19/2007 7:34:48 PM
RE: Send Email Using Yahoo SMTP Server Posted by surinder singh @ 10/22/2007 6:03:11 AM
RE: Send Email Using Yahoo SMTP Server Posted by tushar @ 10/19/2007 7:55:49 PM