Author |
|
Itzik Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 22 June 2005 at 4:28am | IP Logged
|
|
|
Hi Alex,
I have a question.
I'm creating my email system with your pop3 and smtp component.
Maybe I'm missing something? why do I need imap4 component in my system for?
Thank you,
Itzik
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 22 June 2005 at 7:47am | IP Logged
|
|
|
POP3 and SMTP components is enough for development of basic Web-based email system.
However, some mail services (such as AOL) provide IMAP interface only (POP3 is not available). To support such services, IMAP can be used.
Regards,
Alex
|
Back to Top |
|
|
Itzik Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 22 June 2005 at 9:56am | IP Logged
|
|
|
So, I would I know what to use?
I would I know if the mail services (such as AOL), support pop3 or IMAP?
If this the case I would have to get also IMAP.
Thank you,
Itzik
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 22 June 2005 at 10:13am | IP Logged
|
|
|
If you want to automatically determine incoming mail server name/protocol/port from email address, you have to maintain some kind of database where you would store this info (like mail server names, ports, supported protocols (IMAP and/or POP3), etc) for every email address domain.
Also, you must periodically check that this info is up-to-date since mail server holders may change it sometimes. For instance, they can disable or enable POP3/IMAP access for their mail servers, move servers to another IP/host, etc.
In other words, automatic linking email addresses to incoming mail servers names/ports is rather administrative than technical task.
Anyway, you can always allow user to type mail server name, port, and select incoming mail protocol (IMAP/POP3) and do not attempt to obtain this info from your database.
Regards,
Alex
|
Back to Top |
|
|
Itzik Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 22 June 2005 at 11:22am | IP Logged
|
|
|
I understand what you say, but, When I give a mail service to clients, most of them dont know, if ther mail server is pop3 or imap.
In those cases I (as the progremmer) need to figure it out myself.
There is any way to figure it out some how?
Thank you,
Itzik
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 22 June 2005 at 11:58am | IP Logged
|
|
|
You can try to connect to both services. If the connection failed (typically, .ErrCode=4), this means no such service is running on this server, and you should try another service.
E.g.
Code:
If POP3.Connect("mail.server.com", 110, "user", "pass") Then
' Connected
Else
If POP3.ErrCode=4 Then
If IMAP4.Connect("mail.server.com", 143, "user", "pass") Then
' Connected in IMAP mode
End If
End If
End If
|
|
|
However, this is not very reliable since the same error #4 may occur if this is not a mail server at all (or firewall has disabled access to certain ports) so it would spend much time trying to connect to both IMAP and POP3 without any success. This is because the only way to test whether such service is available is to connect to the server at the specified port. If the connection cannot be established for, let's say, 20-30 seconds, we claim connection failure.
Thus, it's impossible to determine for sure why the connection failed - due to the fact that mail service is operating on another port, or due to certain connection problems like firewalls, service is down, etc.
But if you always ask your users (on login screen) for the port number (such as 110 or 143) to connect to, you can use this info for making the choice: 110 is the standard POP3 port, 143 - IMAP port.
Another popular solution is to offer POP3 settings as a default. If POP3 fails, you can offer the user to try IMAP connection. This will work in most cases because IMAP-only access is not a common situation (AOL is one of very few exceptions).
Another trick you can use is to scan server name. For example, AOL's IMAP server is imap.aol.com. So, if imap or imap4 is contained in mail server host name, this is likely IMAP server. However, there is still no guarantee. For example, our own mail server is pop.iforum.com for all mail services (including even SMTP).
Of course, you can combine different options from the list below to achieve better results.
A word about SSL/GMail. If you also wish to serve GMail users (collect POP3 mail from GMail), you should add SSL/TLS option because GMail does not support plain POP3 but supports S/POP3 instead (POP3 over SSL).
TLS/SSL can be easily enabled via MailBee SSL plugin (included in MailBee.dll but licensed separately).
For GMail, you can use the same trick as for AOL. If mail server name string is pop.gmail.com, you should attach SSL object to the POP3 component and connect to port 995.
Regards,
Alex
|
Back to Top |
|
|
Itzik Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 22 June 2005 at 12:27pm | IP Logged
|
|
|
Ok!
About the SSL:
it says: from 99,
but inside it says: Single Developer License - $69
what is the right from price?
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 22 June 2005 at 12:54pm | IP Logged
|
|
|
Sorry, there was an error on the web site. It's now fixed. The correct SSL Single Developer License price is $99.
Regards,
Alex
|
Back to Top |
|
|
xbf Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 30 June 2005 at 10:40am | IP Logged
|
|
|
|
Back to Top |
|
|