Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Place an attachment in OE mail?
Message
De
27/06/2000 09:57:48
Bill Drew
Independent Consultant
Chicago, Illinois, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00384703
Message ID:
00385027
Vues:
19
Here is code that works for me.
note the need to move the attachment over so that it isn't on top of the other one

thispage = thisform.pfbase1.page1
nNowWhat=messageb("Send "+allt(str(nHm))+" Email Messages?",35,"")
if nNowWhat = 6
cthispath = sys(2003)
cthisdrive = sys(5)
cfulldp = cThisDrive+cThisPath
thisform.osession.signon()
thisform.omessage.sessionid = thisform.osession.sessionid
scan
with thisform.omessage
.msgindex = -1
.msgnotetext = thispage.txtMsg.text
.msgsubject = thispage.txtSubject.text
for nIter = 1 to thispage.lstbase1.listcount
cFileName = thispage.lstbase1.list(nIter)
.AttachmentIndex = nIter-1
.AttachmentPathName = cFileName
.AttachmentPosition = nIter-1
endf
.recipDisplayName = cemail
.send(0)
endw
ends
thisform.osession.signoff()
cd &cFullDP
endi

My only problem is that broadcast email seems to have a poor delivery rate. I think spam detectors reject the messages when multiple messages hit the same server at the same time.

>I have created an email from MSMapi.message. Code looks like:
>
>with thisform.message1
>.SessionID = lnSessionID
>.Compose()
>.AddressResolveUI = .f.
>.MsgSubject = "Test Send"
>.MsgNoteText = " Just some Text here "
>.RecipAddress = "srussell@dstinc.com"
>endwith
>
>the help file gets pretty flaky on what flag to alter so an attachment can be made.
>
>It says to bump up the Attachment Index
>
>Thisform.message1.AttachmentIndex = thisform.message1.AttachmentIndex +1
>
>It says that the msgindex must be -1. This line and the next always error:
>wait wind str(thisform.MsgIndex)
>If thisform.MsgIndex = -1 && we blow up here
> If file('c:\myfile.new')
> Thisform.AttachmentName = 'c:\myfile.new'
> Endif
>Endif
>
>Thisform.message1.Send()
>Wait window nowait "Message sent..."
>Endif && vartype(thisform.message1) = "O"
>
>Thisform.session1.SignOff()
>
>
>Any ideas here?
>
>TIA
>
>__Stephen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform