Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use jmail.dll
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
01019683
Message ID:
01020049
Vues:
33
There is another route to the SMTP Server:-)
oCDO=CREATEOBJECT('CDO.Message')
oCFG=oCDO.Configuration
lcMySMTPServer=oCFG.Fields(15).Value

>Here you go:
>
*!* Email with attachments
>PUBLIC oSMTPMail
>oSMTPMail = NEWOBJECT("jmail.SMTPMail")
>***If you aren't sure leave this commented out
>***let the object figure it out for you if possible
>***oSMTPMail .ServerAddress = "mail.mymailserver.com"
>oSMTPMail.AddRecipient ("someone@theirmailserver.com")
>oSMTPMail.Sender = "me@mymailserver.com"
>oSMTPMail.SenderName = "SlightHaze"
>oSMTPMail.Subject = "Sending AutoExec as Attachment..."
>oSMTPMail.Body = "Hello World!  Here is my AutoExec.bat file."
>oSMTPMail.AddAttachMent ("C:\AutoExec.bat")
>oSMTPMail.Execute()
>RELEASE oSMTPMail
>
>***In order to receive/download email messages you would
>***need the professional version of JMail which is NOT freeware
>***I am not advocating it, just wanted to provide an example of
>***downloading messages and their attachments with JMail
>***(Thanks to ShyFox for asking about it)
>
>LOCAL oPop3, oMessages, nMsgCount, nCounter
>LOCAL oMsg, oAttaches, nAttachCount, nCounter2, oAtt
>
>oPop3=CREATEOBJECT("jmail.pop3")
>oPop3.connect("username","password","mail.mymailserver.com")
>oPop3.DownloadMessages()
>oMessages=oPop3.Messages
>nMsgCount=oMessages.count()
>FOR nCounter = 1 TO nMsgCount
>    oMsg = oMessages.Item(nCounter)
>    ?oMsg.Date
>    ?From
>    ?FromName
>     ?Priority
>    ?Subject
>    ?Body
>     oAttaches = oMsg.Attachments
>     nAttachCount = oAttaches.count()
>    FOR nCounter2 = 1 TO nAttachCount
>        oAtt = oAttaches.Item(nCounter2)
>        ? oAtt.ContentType
>        ? oAtt.Size
>        =STRTOFILE(oAtt.Data,oAtt.Name)
>    ENDFOR
>ENDFOR
>
>
>>hi
>>i found it in a spanish site for sending and reciving e-mails.
>>but i don't know how to use it?
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform