Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: vaishali maske
  Where is vaishali maske?
 mumbai
 India
 vaishali maske
 Tags
Subject: RE: connecting email records
Thread ID: 209462 Message ID: 209533 # Views: 3 # Ratings: 0
Version: Visual FoxPro 8 Category: ODBC, ADO and OLEDB
Date: Monday, December 29, 2008 1:06:49 PM         
   


> >
> > Since you are using Thunderbird, I guess you have a POP3 or IMAP account. Both of which can be handled by MS Outlook. If you move to MS Outlook, you will be able to use Outlook Automation, which will give you the ability to read any mail in any folder.
> >
> > Regards
> > Tushar
>
>
> Hi,
>
> I use following coding for connecting outlook.
>
> LOCAL lcSchema, loConfig, loMsg, loError, lcErr
> lcErr = ""
> lcSchema = "http://schemas.outlook.com/cdo/configuration/"
> loConfig = CREATEOBJECT("CDO.Configuration")
> WITH loConfig.FIELDS
> .ITEM(lcSchema + "smtpserver") = "info@oceanicpharmachem.com"
> .ITEM(lcSchema + "smtpserverport") = 465 && Port Name
> .ITEM(lcSchema + "sendusing") = 2
> .ITEM(lcSchema + "smtpauthenticate") = .T.
> .ITEM(lcSchema + "smtpusessl") = .T.
> .ITEM(lcSchema + "sendusername") = "vaishali@octchem.com"
> .ITEM(lcSchema + "sendpassword") = "pass1"
> .UPDATE
> ENDWITH
> loMsg = CREATEOBJECT ("CDO.Message")
> WITH loMsg
> .Configuration = loConfig
> .FROM = "yrmail@gmail.com"
> .TO = "foxite@foxite.com"
> * .DSNOptions=2 & if u define this setting mails are not save at sender end
> .Subject = "This is my Test Message "
> .TextBody = "This is a test Mail to " + ;
> "autenticacion SSL side Gmail account"
> .AddAttachment(GetFile())
> .Send()
> ENDWITH
>
> but above code shows following error.
>
> oleIdispatch exception code from 0 CDO message.1:The "sendusing"configuration value is invalid.
>
> Pls tell me solution.
> Thanks

I have never used CDO. I have used Outlook Automation

LOCAL loOutlook,loOutLookItem
loOutLook = CREATEOBJECT('Outlook.Application')
loOutLookItem         = loOutLook.CreateItem(0)
loOutLookItem.TO      = lcAddress
loOutLookItem.Subject = lcSubject
loOutLookItem.Attachments.ADD(lcAttachFileName)		
loOutLookItem.Body   = lcBody
loOutLookItem.send


In your message the smtp server value looks wrong. Maybe it should be oceanicpharmachem.com . Also you are sending from one server and in the from field, you are giving a gmail account. I think some SMTP servers may not like that.

Regards
Tushar

ENTIRE THREAD

connecting email records Posted by vaishali maske @ 12/29/2008 6:57:06 AM
RE: connecting email records Posted by tushar @ 12/29/2008 7:16:32 AM
RE: connecting email records Posted by vaishali maske @ 12/29/2008 7:33:45 AM
RE: connecting email records Posted by tushar @ 12/29/2008 7:52:59 AM
RE: connecting email records Posted by vaishali maske @ 12/29/2008 9:41:44 AM
RE: connecting email records Posted by tushar @ 12/29/2008 1:06:49 PM
RE: connecting email records Posted by vaishali maske @ 12/30/2008 5:07:01 AM
RE: connecting email records Posted by tushar @ 12/30/2008 6:50:59 AM