Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yousfi Benameur
  Where is Yousfi Benameur?
 El Bayadh
 Algeria
 Yousfi Benameur
 To: vaishali maske
  Where is vaishali maske?
 mumbai
 India
 vaishali maske
 Tags
Subject: RE: connecting thunderbird
Thread ID: 209532 Message ID: 209544 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: Web Applications
Date: Monday, December 29, 2008 2:19:26 PM         
   


> Hello all experts,
>
> I use following code to connect thunderbird from visual foxpro 8.0 but it shows error that OLE IDispatch exception code 0 from CDO.Message.1:The "SendUsing" configuration value is invalid.Please tell me solution.
>
>
> coding is:-
> LOCAL lcSchema, loConfig, loMsg, loError, lcErr
> lcErr = ""
> * lcSchema = "http://schemas.outlook.com/cdo/configuration/"
> lcSchema = "http://www.OCEANICPHARMACHEM.com/"
> 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") = "vaishali13"
> .UPDATE
> ENDWITH
> loMsg = CREATEOBJECT ("CDO.Message")
> WITH loMsg
> .Configuration = loConfig
> .FROM = "vaishali@octchem.com"
> .TO = "vaishali@octchem.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

Hi Vaishali



Note that free Microsoft mail component CDO, which ships with Windows 2000, Windows XP, and Windows Server 2003.
you are using "lcSchema ...or outlook" instead of "microsoft" in schema configuration.
this is an example of coding '(replace your data :SMTPserver,from,to.. before using) :

sch = "http://schemas.microsoft.com/cdo/configuration/" 
 
 cdoConfig = CreateObject("CDO.Configuration") 
 
    With cdoConfig.Fields 
        .Item(sch + "sendusing") = 2 && cdoSendUsingPort   &&your data
        .Item(sch + "smtpserver") = "<enter_mail.server_here>"   &&your data (valid server)
        .ITEM(sch + "smtpserverport") =25  &&your Port Name
        .update 
    EndWith 
 cdoMessage = CreateObject("CDO.Message") 
     With cdoMessage 
     .Configuration = cdoConfig 
        .From = "from@me.com" &&your data  
        .To = "to@me.com"     &&your data
        .Subject = "Sample CDO Message" 
        .TextBody = "This is a test for CDO message" 
	.AddAttachment "c:\myattachment.jpg"     &&your data
        .Send 
    EndWith 
 
    cdoMessage = Null
    cdoConfig = Null

Make a test and can add your other data

see this microsoft link for cdo configuration:
http://msdn.microsoft.com/en-us/library/ms526318(EXCHG.10).aspx
Regards

ENTIRE THREAD

connecting thunderbird Posted by vaishali maske @ 12/29/2008 12:57:26 PM
RE: connecting thunderbird Posted by Yousfi Benameur @ 12/29/2008 2:19:26 PM