POP3 and SMTP

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Marvin.


Hi!

I'm looking for one or to snippets, that connect to a
POP3 account, look for new mail, gets them if any,
disconnects and a routine to sent emails via SMTP.

Can anybody help?

Greetings from Berlin/Germany
Marvin


Old programmers don't die... they just branch to another address!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Look at http://www.reelmediaproductions.com/pb/ for AtomicMailer..

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Marvin.
Look at http://www.reelmediaproductions.com/pb/ for AtomicMailer..

Thanks a LOT - THATS what I had been looking for!
After downloading numberless snippets, the only
thing missing is the registered PB version, I'm
still waiting for. :)

Marvin
Old programmers don't die... they just branch to another address!
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Andre.
After downloading numberless snippets, the only
thing missing is the registered PB version, I'm
still waiting for. :)
If you are Georg Wiemann, then sent a private mail to me ([url]mailto:andre@purebasic.com[/url])
Thanks !


Regards
André

*** German PureBasic Support ***
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Manolo.

Hi!

I'm looking for one or to snippets, that connect to a
POP3 account, look for new mail, gets them if any,
disconnects and a routine to sent emails via SMTP.

Can anybody help?

Greetings from Berlin/Germany
Marvin


Old programmers don't die... they just branch to another address!
Hi,
Please see the next code

Code: Select all

#MAPI_LOGON_UI = 1
#MAPI_PASSWORD_UI = $20000

Structure MapiMessage
  ulReserved.l
  lpszSubject.l
  lpszNoteText.l
  lpszMessageType.l
  lpszDateReceived.l
  lpszConversationID.l
  flFlags.l  
  lpOriginator.l
  nRecipCount.l
  lpRecips.l      
  nFileCount.l
  lpFiles.l
EndStructure

Structure MapiRecipDesc
  ulReserved.l
  ulRecipClass.l
  lpszName.l
  lpszAddress.l
  ulEIDSize.l
  lpEntryID.l
EndStructure

RecipName.s = "Manolo";this is the remit name
RecAddress.s = "SMTP:[url]mailto:sascha.order@freenet.de[/url]"; you SMTP account - 
               ;RecAddress.s and need same SMTP name that SendAddres ... hmmmm.. I need see this...

mrd.MapiRecipDesc
mrd\ulReserved = 0
mrd\ulRecipClass = 1
mrd\lpszName = @RecipName
mrd\lpszAddress = @RecAddress
mrd\ulEIDSize = 0
mrd\lpEntryID = 0

SendName.s = "sushi";The destination name
SendAddress.s = "SMTP:[url]mailto:sascha.order@freenet.de[/url]";the destination account
             ;RecAddress.s and need same SMTP name that SendAddres ... hmmmm.. I need see this...

msd.MapiRecipDesc
msd\ulReserved = 0
msd\ulRecipClass = 0
msd\lpszName = @SendName
msd\lpszAddress = @SendAddress
msd\ulEIDSize = 0
msd\lpEntryID = 0

Subject.s = "Test"
Message.s = "This is one test for sushi. Message body"
DateReceived.s = "2002/05/16 11.40"

mm.MapiMessage
mm\ulReserved = 0
mm\lpszSubject = @Subject
mm\lpszNoteText = @Message
mm\lpszMessageType = 0
mm\lpszDateReceived = @DateReceived
mm\lpszConversationID = 0
mm\flFlags = 0
mm\lpOriginator = @msd
mm\nRecipCount = 1
mm\lpRecips =  @mrd
mm\nFileCount = 0
mm\lpFiles = 0

resultado.l

MAPIDll = LoadLibrary_("MAPI32.DLL")
If MAPIDll
  MAPISendMail = GetProcAddress_(MAPIDll, "MAPISendMail")
  If MAPISendMail
    StrucPtr = @mm
    Flags = #MAPI_LOGON_UI|#MAPI_PASSWORD_UI
    push dword 0
    push dword 0
    push StrucPtr
    push Flags
    push dword 0
    call MAPISendMail
    mov resultado, eax
    If resultado
      MessageRequester("Error", "Undefined error", 0)
    EndIf
  Else
    MessageRequester("Error", "Undefined error", 0)
  EndIf
Else
  MessageRequester("Error", "Undefined error", 0)
EndIf
Regards,
Manolo
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Manilo... did you check the email that is sent with this code?

The "from" address contains the same info as the "to" address.
Also, a message box from outlook always pops up and wants confirmation so send the email.
Post Reply