Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Philip Lawson
  Where is Philip Lawson?
 
 Ghana
 Philip Lawson
 To: Marcia Akins
  Where is Marcia Akins?
 Akorn
 Ohio - United States
 Marcia Akins
 Tags
Subject: RE: PLEASE VALIDATE THE E-MAIL CODING
Thread ID: 112274 Message ID: 112339 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Tuesday, November 07, 2006 1:56:01 PM         
   


Hello Marcia,

I have attached the codes. I have in addition installed the redemption.dll patch.

The system has to
scan endsan
records.

However after the first record has been sent, it comes up with an error message;


OLE IDispatch exception code O from Redemption.SafeMailItem:
Could not submit the message - error 0x80040607


*************************************************
SELECT
MAILREADY

 SCAN



#DEFINE olMailItem 0

LoOutLook = CREATEOBJECT("OUTLOOK.APPLICATION")
LoNameSpace = loOutLook.GetNameSpace("MAPI")
LoNameSpace.Logon
loMailItem = loOutLook.CreateItem(olMailItem)
LoSafeItem = CREATEOBJECT("Redemption.SafeMailItem")

With loSafeItem
.Item = loMailItem
.Subject = THISFORM.SUBJECT1.VALUE+' '+ 'Attention:'+' '+MAILREADY.MG_NAME
.To= MAILREADY.PG_EMAIL &&,RECPTO
.Cc=MAILREADY.PG_EMAIL && "kdonkor@yahoo.com"
.Attachments.Add(LCFILENAME)
.send
*.Bcc=RECPBCC && "CARL@hotmail.com"AddFileattachment
*.body = txt
&& .Display()
Endwith

*!* if loSafeItem.send()


*!* else
*!* messagebox("Your Message to"+MyOLItem.TO +"was not sent.",64, "EMAIL PROBLEM WITH MAPI")
*!*
*!* ENDIF


ENDSCAN	   


******************************************************
******************************************************












> I have written the folllwing codes to automate the outlook electronic maling.
> However I keep having problems with the send command

>
>
> #DEFINE olMailItem  0
> *** Create a new mail item
> loMsg = loOutlook.CreateItem( olMailItem )
> IF VARTYPE( loMsg ) = 'O'
>   WITH loMsg
>     *** Set the required message properties
>     .Subject = "Fox Rocks!"
>     .Body = "VFP 9 is a great product"
>     *** Add the recipients
>     .Recipients.Add( "BillGates@Microsoft.com" )
>     .Recipients[ lnCnt ].Type = 1
>     *** And finally, add the attachment if there are any
>     .Attachments.Add( "d:\My documents\some document.doc" )
>     *** And send it off
>     .Send()
>   ENDWITH
> ENDIF
> 

>
> Regards,
> Marcia G. Akins
> Tightline Computers, Inc.


ENTIRE THREAD

PLEASE VALIDATE THE E-MAIL CODING Posted by Philip Lawson @ 11/7/2006 1:10:25 AM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Ken Murphy @ 11/7/2006 1:34:46 AM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Marcia Akins @ 11/7/2006 12:48:17 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Ken Murphy @ 11/7/2006 1:23:31 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Philip Lawson @ 11/7/2006 1:56:01 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Marcia Akins @ 11/7/2006 3:38:23 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Philip Lawson @ 11/7/2006 4:07:25 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Marcia Akins @ 11/7/2006 5:02:12 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Philip Lawson @ 11/7/2006 5:46:28 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Mike Gagnon @ 11/7/2006 6:09:42 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Marcia Akins @ 11/7/2006 7:23:52 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Philip Lawson @ 11/8/2006 8:19:45 AM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Marcia Akins @ 11/8/2006 11:01:18 AM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by Philip Lawson @ 11/8/2006 5:34:27 PM
RE: PLEASE VALIDATE THE E-MAIL CODING Posted by tushar @ 11/7/2006 3:46:29 PM