Re: VFP 9: Outlook and Extended MAPI
- From: "Mike Gagnon" <mikegagnon@xxxxxxxxxxxxxxxx>
- Date: Fri, 29 May 2009 18:15:20 -0400
Ok, so you use outlook as I see.
So you want to validate the e-mail address before sending it?
Once the e-mail is filled with the code you are using, it is tool late to validate the e-mail address. I would suggest you use a VFP form for the user to fill the information, and when he hits the send button, do your e-mail address validation then, and then send the e-mail.
"Gene Wirchenko" <genew@xxxxxxxx> wrote in message news:9c9025hkq40g84ldtcp9kdmj75h2c16r3h@xxxxxxxxxx
"Mike Gagnon" <mikegagnon@xxxxxxxxxxxxxxxx> wrote:
How are you sending the e-mail?
A VFP form or outlook?
I do not understand your question. I am sending it with:
***** Start of Included Code *****
#define olMailItem 0
#define olTo 1
#define olCC 2
#define olBCC 3
local ooutlook, omailitem
ooutlook=createobject("Outlook.Application")
omailitem=ooutlook.CreateItem(olMailItem)
with omailitem
* .From=alltrim(csysshad.fromem) && no such property
.Subject=theclcode+".Invoice (from Int'l Market Access,
Inc.)"
.Body=embody
with .Recipients
local clines, i, whom, fresolved
clines=memlines(cclishad.emto)
for i=1 to clines
emaddr=mline(cclishad.emto,i)
if !empty(emaddr)
whom=.Add(emaddr)
whom.Type=olTo
endif
endfor
clines=memlines(cclishad.emcc)
for i=1 to clines
emaddr=mline(cclishad.emcc,i)
if !empty(emaddr)
whom=.Add(emaddr)
whom.Type=olCC
endif
endfor
fresolved=.ResolveAll()
endwith
if !fresolved
if !empty(statusmsg)
statusmsg=statusmsg+CHRCR
endif
if justone
statusmsg=statusmsg+;
"Warning: Access was unable to resolve all E-mail addresses for this
client."
else
statusmsg=statusmsg+;
"Warning: Access was unable to resolve all E-mail addresses for client
";
+theclcode+"."
endif
endif
for i=1 to cemfiles
.Attachments.Add(epdir+"\"+emflist(i,1))
&& This is correct as epdir is where the emflist files
now are.
endfor
endwith
if fsaveem
omailitem.Save()
endif
if fsendem
omailitem.Send()
endif
omailitem=.null.
ooutlook=.null.
***** End of Included Code *****
[snip]
Sincerely,
Gene Wirchenko
Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.
.
- Follow-Ups:
- Re: VFP 9: Outlook and Extended MAPI
- From: Gene Wirchenko
- Re: VFP 9: Outlook and Extended MAPI
- References:
- Re: VFP 9: Outlook and Extended MAPI
- From: Mike Gagnon
- Re: VFP 9: Outlook and Extended MAPI
- From: Gene Wirchenko
- Re: VFP 9: Outlook and Extended MAPI
- Prev by Date: Re: MessageBox Problem
- Next by Date: Re: What to do when disaster strikes but requires user input
- Previous by thread: Re: VFP 9: Outlook and Extended MAPI
- Next by thread: Re: VFP 9: Outlook and Extended MAPI
- Index(es):
Relevant Pages
|