Atomic Mailer Error. (Email send/read using PB?)

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 Art Sentinel.

Hi,

Has anyone else had any trouble with the Atomic Mailer? I downloaded the latest version, and test ran it on a full registered PB 3.20 (with library updates). All I did was to change the lines where I set my mail server and account name and password. I have worked with server email accounts for years now, so I am sure the information I added was correct. (I tried this on two separate, unrelated mail servers.) However, when I run it, it says connected... Then I only get a endlessly repeated "Bad received packet" error after that.

Actually, at first, I receieved a compiler warning that the NetworkClientEvent() was lacking parameters. So I added ConnectionID with the parentheses.

I am trying to find a good way to send and receive emails from within a PB application. I am reading the RFC repository right now. It is somewhat confusing so far. If anyone can help me find a good solution, I will be extremely grateful. I don't want someone to do this for me; I want to learn to do it myself. Of course, a helping hand along the way would be appreciated. :)

Thank you!


--------------

Top Ten Reasons Not To Procrastinate:


Coming Soon...
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 Pupil.

I don't think the source to the Atomic Mailer is up to date with Pure Basic since version 3.20, you should change some of the lines as i suggest below:

Code: Select all

; from this:
If OpenNetworkConnection(POP_Provider$, 110)
  ...
; to this:
ConnectionID.l = OpenNetworkConnection(POP_Provider$, 110)
if ConnectionID
  ...

; Every occurence of:
NetworkClientEvent()
; Should be changed to:
NetworkClientEvent(ConnectionID)

; Every occurence of:
ReceiveNetworkData(0, ...)
; Should be changed to:
ReceiveNetworkData(ConnectionID, ...)

; And at last every occurence of:
SendNetworkData(0, ...)
; Should be changed to:
SendNetworkData(ConnectionID, ...)
Hope this helps a little, i believe this will take you a good step towards getting the program to function properly.





Edited by - Pupil on 23 July 2002 16:22:13
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 Art Sentinel.

Thank you Pupil! I already changed all the 0's to 'ConnectionID', but for some unknown reason I did not think to set the ConnectionID = the opened network connection. (??) I suppose my brain was on vacation at that time. :)

The Atomic mailer is now correctly connecting to my mail server thanks to you. (I just have to figure out how to edit and use it.) This was a great help you gave to me. I have worked for many years as a multimedia developer, but only recently am I teaching myself more 'down-and-dirty' coding. I thrive off of this stuff! (Most people think I am out of my mind when I tell them that. Haha..)

What I am trying to achieve is to design a PB application that can send and receive email messages. It would be extremely helpful to be able to send via the BCC or CC header. It is not easy and I sincerely appreciate all the help I am kindly given. Once I get this hurdle crossed, I will be able to finish my application. I was searching for a dll that could work as the email engine for my app, but I was not successful. :( Anyhow, programming it myself is a good challenge and fun.

I am writing parsing routines right now to extract the data from the incoming emails, use an HTML based template (with variables from the extracted data), and send out replies on it own.

Take care, and thank you for your generous help.


--------------

Top Ten Reasons Not To Procrastinate:


Coming Soon...
Post Reply