[VB/CDOSYS] Inbox uitlezen *

Pagina: 1
Acties:

  • semicon
  • Registratie: Augustus 2003
  • Laatst online: 20-08-2025
Ik weet niet precies of het wel kan, ik vindt het niet op google/Got. Een mail versturen lukt me wel, voorbeeld:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
MailUserName = Session.Contents("MailUserName")
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = MailUserName
    .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = Session.Contents("MailPassword")
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xxx.xxxxxxxxx.xx"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

    .Update
End With

With iMsg
    Set .Configuration = iConf
    .To         = RF("cTo")
    .From       = MailUserName & "@xxxxxxxxxx.nl"
    .Subject    = RF("cSubject")
    .TextBody   = RF("cBodyText")
    .Send
    
End With

Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing


Werkt perfect..
Maarnu wil ik alleen mijn mailbox uitlezen, kan dat met cdosys op deze manier?
Het is geen lokaale smtp service, ik gebruik die van mn host.

Is het mogelijk, zo ja, waar moet ik zoeken om de oplossing te vinden... ?

  • Creepy
  • Registratie: Juni 2001
  • Laatst online: 17:56

Creepy

Tactical Espionage Splatterer

Mail lezen doe je via pop3 of imap, niet via smtp.

"I had a problem, I solved it with regular expressions. Now I have two problems". That's shows a lack of appreciation for regular expressions: "I know have _star_ problems" --Kevlin Henney


  • semicon
  • Registratie: Augustus 2003
  • Laatst online: 20-08-2025
so ehh. dat betekend dat ik wel mail kan versturen via smtp,

maar inbox uitlezen moet op andere manier.. shaz, moet toch wel iets voor zijn.

  • semicon
  • Registratie: Augustus 2003
  • Laatst online: 20-08-2025
code:
1
2
3
4
5
6
Set cdoSession = Server.CreateObject("CDONTS.Session")
cdoSession.LogonSMTP "pasword" , "myadres@webbydesign.nl"
Set objInbox = cdoSession.Inbox
Set strMessages = objInbox.Messages

.. enz for lussen enz...


Dit stukje hierboven werkt niet bij mij, maar zoiets zoek ikdus, moet toch te doen zijn, ik krijg hier met dit scriptje toegang geweigerd

  • Creepy
  • Registratie: Juni 2001
  • Laatst online: 17:56

Creepy

Tactical Espionage Splatterer

http://msdn.microsoft.com...donts_session_object_.asp

Kijk daar eens ;)
Je kan dus alleen mail lezen van de server waar het script op draait.

"I had a problem, I solved it with regular expressions. Now I have two problems". That's shows a lack of appreciation for regular expressions: "I know have _star_ problems" --Kevlin Henney


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 12-05 22:23

curry684

left part of the evil twins

Creepy schreef op 02 juni 2004 @ 11:27:
Mail lezen doe je via pop3 of imap, niet via smtp.
:D

semicon: begin aub eens met de RFC's over SMTP ([google=rfc smtp]) en POP3 ([google=rfc pop3]) te lezen, je hebt volgens mij geen idee waar je mee bezig bent ;)

[ Voor 4% gewijzigd door curry684 op 02-06-2004 12:11 ]

Professionele website nodig?

Pagina: 1