Simple email forwarding server - c#

I need to forward emails for a several domains to other email addresses. Previously I have used hMailServer on my Windows server to perform this forwarding function, but I am looking for something simpler that I can interface with from a .NET application.
Is there a simple email forwarding server I can easily manage from .NET? Spam filtering or email storage is not required.

I've never used hMailServer but according to the documentation there's a COM API that looks like it would be automation compatible (since they've got VBScript samples) so you should be able to access this from .Net.
I'd suggest looking at the Rule object or the forum

Related

Issuing email addresses to users

What needs to be done for an application to be able to issue email addresses, such as user123#mydomain.com?
I'm using Amazon SES to send out emails, do they have a service for this or would this have to do with the domain registrar (GoDaddy), or both?
The client to check email would be the web application itself.
I'm using C#.Net and Mvc for that as far as development is concerned but would prefer to use existing SaaS wherever possible.
What are some good ways to go?
EDIT: I checked with GoDaddy and they can't do this at scale. I don't believe Amazon does this either. How is this done?
This would all depend on your implementation of email server host. If you are running Windows with IIS and Email Post office then users are of the host domain. You can use the admin scripts for adding users from the site in this case.
If you are using Linux and a thrid party email service, it will likely have a user interface for adding users. Howerver these implementations generally use MySQL on the backend so you can add users through script from an implementation of PHP through Apache webserver host or backend service that adds users through MySQL script.
You need a mail server. As you can see from the list there are plenty of mail servers that exist, however there are some serious leaders in the field:
According to one survey, sendmail, Microsoft Exchange Server, Postfix,
and Exim together control over 85% of market share for SMTP service in
2010.1
I strongly recommend not hosting such a server in your code (if an implementation even exists, which I couldn't find)
After configuration of the mail server (which may need some intensive investment either in time or money, since this is complicated; some mail servers are notoriously complicated) you point your domain to the mail server. Mails can now be received to the email adresses you define.
This process is complicated, and I have a feeling that your question shows you don't know exactly what you need either (In fact I would have recommended closing it as too broad). I'd recommend reformulating exactly what you need and what you have so far. Don't hesitate to get in touch with someone that may help you formulate your needs.

C# Mail Server?

I'm trying to understand exactly what it is I need to be implementing and am just after a little guidance. I know very little about email standards such as POP3, IMAP, SMTP which is probably what's making the getting started difficult.
What'd I'd like to do consists of a couple of things:
Be notified of the arrival of an email at a specific custom address. e.g. hi.me#myapp.com.
Handle multiple addresses per user.
Be able to process this email and either delete it, leave it and be able to display in a web email client or forward it on based on various rules.
I've seen a few SMTP libraries and a POP3 one, but I'm not 100% sure what I need to do this. I'm guessing the best way would be to write a full C# mail server - but I'm hoping for a little guidance/suggestion.
Thanks
If you really want to build a mailserver from scratch, the protocol specifications are all available as RFCs.
For IMAP that would be RFC-3501 and for SMTP RFC-2821, you can google for the rest.
I've been working on a C# SMTP server in my (very limited) spare time, mostly out of frustration with existing MTAs and as an exercise in C# server programming. I can tell you that there's a bit more to it than you might think. So if you want fast results, I'd seriously consider hooking into an existing MTA/mailserver setup.
Depending on how fast you want to process messages, it may be sufficient to poll one or more mailboxes. You could process the messages and, for example, forward them to another mailbox using the built-in .NET SmtpClient.
On top of that, all mail servers I know of implement not just the SMTP protocol but also a slew of anti-spam measures. Most of these measures have matured over many years. You get all that for free if you build on top of an existing mail server infrastructure.
Then again, configuration of just about any mail server I know seems to be a fine art, hence my frustration with them.

Application to access, read & delete mails in my webmail with C#

I have been able to send mails from my own domain successfully. My problem now is that I need to access the account and retrieve all the mails that I receive from postmaster and process the information in the mail.
How can I do this? I have been searching the web but could only find solutions involving third party libraries. .NET doesn't bring an inbuild class that helps with this?
First you need to understand what protocols does the Mail Server in question support.
You can find this by either reading the help that accompanies it or search in Google for that Mail Server. You may also need to set some settings on the server before you can start coding.
After you understood what protocols your server supports, use some of the following:
If you are using a POP3 server, you may fine the following article useful : A POP3 Client in C# .NET
If you are facing IMAP or Exchange server, you may want to the link that Billy Coover gave you: Read MS Exchange email in C#
What type of email server are you working with? If it's exchange, there are some options: Access exchange e-mail in C#
First you can try to dedect what protocols(IMAP/POP3) supported by remote server.
You can try imap_clinet_app.zip or pop3_client_app.zip applications from http://www.lumisoft.ee/lsWWW/download/downloads/Examples/ to connect your server.
If you can connect, then specified protocol supported.
Both application comes with full source code, so if can use IMAP or POP3, you can use that library in your project.

Sending a MAPI email via Java ( or C# )

I have a java program that sends some emails currently using SMTP. I have a customer whose corporate network is locked down and only allows sending of emails via the MAPI1 and MAPI4 protocols.
After looking around on the internet I have been unable to find any examples of sending an MAPI email from a Java program. If we have to pay for some 3rd party component its not the end of the world, but free is obviously better :)
Another point to add is that if the task is much easier in C# then there is the possibility of creating the send email functionality in C# and calling the C# program from the Java main application.
Please let me know if you require anymore information.
All of the following can send mails via MAPI from Java:
http://www.codeproject.com/KB/IP/CMapiEx.aspx
https://github.com/briandealwis/jmapi
http://www.moyosoft.com/joc/ (commercial)
http://www.dimastr.com/redemption/ (commercial) together with http://sourceforge.net/projects/jacob-project/ (COM bridge for Java)
http://www.moonrug.com/features.html (commercial) (no longer appears to exist)
You will usually need the MAPI COM components on the local machine and always the credentials for the MAPI connection/Exchange account!
Since I am not sure what you mean by MAPI4 versus MAPI1 I suspect that you might mean IMAP (there is a V 4 of the protocol) which is quite different from MAPI - just in case the following are Java options for IMAP:
http://www.oracle.com/technetwork/java/javamail/javamail143-243221.html
http://www.chilkatsoft.com/java-imap.asp (commercial)
Take a look at the JMapi library, it only works on windows machines but should do what you want ...

c# imap/pop3 mail server

I have searched all over the web for a solution for this situation.
I created an application using a PowerTCP component to receive and change mails(Imap/pop3)
I created a new object for them and now all I want is to create a server*(Mail Server)* that uses Imap or pop3 mails to receive and sends mails with SMTP.
I know that I need to use specific ports for it.
What I want to know is how can I create an imap/pop3 object from my C# object(my class , properties, ext) using c# to send to the client email application (like outlook). I searched a lot for this and found nothing.
I don't want to use any "close" server application for this because that I want to change
Do I need to create it from the beginning or there is any ready to use solution for this.
do you have any suggestion code template ext...
TIA
Michal
Check out this site, it has examples of how to implement SMTP/POP
http://www.codeproject.com/KB/IP/Pop3MailClient.aspx
C#'s built in classes are pretty stable, use SMTP and POP3.
Good luck!
I believe S22.Imap is the most popular general IMAP protocol API in Nuget.

Categories

Resources