03. april 2001 - 22:12Der er
7 kommentarer og 1 løsning
Tjek mail via ASP/PHP
Er det muligt at lave et script, der tjekker indkommende mail fra en bestemt POP3-konto og derefter smider det op i en database? Det skal enten være lavet i ASP eller PHP, men allerhelst ASP. Der må gerne bruges komponenter, men prøv at undgå det...
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
Et eksempel på brug af Jmail4 til at hente mail fra pop3, Jmail er ikke gratis og jeg tvivler på at du finder et komponent som er gratis til at tjekke pop3.
Response.Write( \"You have \" & pop3.count & \" emails in your mailbox!<br><br>\" )
if pop3.count > 0 then Set msg = pop3.Messages.item(1)
\' Note the first element of this array is 1 \' since the POP3 server starts counting at 1 ReTo = \"\" ReCC = \"\"
Set Recipients = msg.Recipients separator = \", \"
\' We now need to get all the recipients, \' both normal and Carbon Copy (CC) recipients \' and store them in a variabel
For i = 0 To Recipients.Count - 1 If i = Recipients.Count - 1 Then separator = \"\" End If
Set re = Recipients.item(i) If re.ReType = 0 Then ReTo = ReTo & re.Name & \" (\" & re.EMail & \")\" & separator else ReCC = ReTo & re.Name & \" (\" & re.EMail & \")\" & separator End If Next
\' This function iterates through the Attachments object, \' and saves the attachment to the server\'s disk. \' It also returns a nicely formatted string with a \' link to the attachment. Function getAttachments() Set Attachments = msg.Attachments separator = \", \"
For i = 0 To Attachments.Count - 1 If i = Attachments.Count - 1 Then separator = \"\" End If
Set at = Attachments(i) at.SaveToFile( \"c:\\attachments\\\" & at.Name ) getAttachments = getAttachments & \"<a href=\"\"/attachments/\" &_ at.Name &\"\"\">\" & at.Name & \"(\" & at.Size & \" bytes)\" &_ \"</a>\" & separator Next End Function
Okay, Netsrac - tak for hjælpen - jeg er igang med at downloade Jmail nu, og det ser ud til, at den er gratis... Jeg har i hvert fald ikke læst noget om priser ;-)
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.