View Poll Results: Would you use this SMTP server class?

Voters
41. You may not vote on this poll
  • I am very interested and look forward to seeing the end result

    17 41.46%
  • I would probably give it a go when it is complete

    14 34.15%
  • I am not really interested myself but it sounds like a good idea

    6 14.63%
  • I think it would be useless

    4 9.76%
Page 1 of 3 123 LastLast
Results 1 to 40 of 115

Thread: Would you use my .NET SMTP server class?

  1. #1

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Would you use my .NET SMTP server class?

    I get the feeling that this probably isnt the best place to post this, but the forum says "drop in here to discuss anything related to VB.NET" and this is definitely only related to VB.NET and not VB6 or anything. Anyway, if its in the wrong place then feel free to move it mods/admins

    As most of you will know, an SMTP server is a server that can send and receive emails. There are questions on these forums quite often about how to use google's SMTP server or Yahoo's SMTP server for example to send an email and generally it is a bit of a pain having to rely on a free public SMTP server. This is because for one thing you dont know that it will always be there or if the details required to access it will change slightly - plus you are only supposed to use these SMTP servers to send emails from the domain that you are using the SMTP server of. So for example if you use google's server then you should only send emails from your @gmail.com address or whatever.

    So I decided a while ago to try and write my own SMTP server, as a class library so that other people could use it's functionality in their own programs. As you can imagine, this is not a particularly easy task and is taking far longer than I anticipated - whilst I will probably continue to make it just for the learning experience, I am just wondering how many people would actually use something like this? I mean if lots of people tell me that they are interested in it then I'm sure I will spend a lot more time on it, but at the moment its a bit hard to find the enthusiasm when I have loads of other stuff to do and I'm only doing it for myself.

    If you could just fill in the poll attached to this thread to let me know how interested you are in this that would be great

    Also, just to clarify what I am actually making, you would basically be able to just add a reference to my DLL and then do something like this:
    vb Code:
    1. Dim SmtpServer As New SmtpSender
    2. SmtpServer.Send("[email protected]", "[email protected]", "subject here", "body here")
    and that's it, it would send the email (provided you have port 25 open outbound, but you need that to use the standard .NET SmtpClient class anyway so thats nothing special). You dont need to specify an SMTP server or anything, because this is the SMTP server.

    Thanks
    Chris

    EDIT: See post #7 for a better description!
    Last edited by chris128; Nov 4th, 2009 at 09:25 AM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  2. #2
    Fanatic Member Seraph's Avatar
    Join Date
    Jul 2007
    Posts
    959

    Re: Would you use my own .NET SMTP server ?

    I would trust Google not to randomly make their server unavailable before just some person though.

    Visual Studio 2010 Professional | .NET Framework 4.0 | Windows 7

    SERYSOFT.COM :: SysPad - Folder Management Program - Please comment HERE if you find this program useful, have ideas, or know of any bugs.
    [Very useful for IT/DP departments where many folders are consistently accessed. Also contains a scratchpad window for quick access to notes.]

    [.NET and MySQL Quick Guide]

  3. #3

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my own .NET SMTP server ?

    What do you mean "before just some person" ? I wouldnt be hosting this SMTP server or anything, it would be run from your own program so as long as you have got the DLL then it will work.

    Anyway, I didnt mean they would just suddenly take it offline, I meant more like if they were to change the access details - like if Yahoo suddenly made their SMTP server require SSL for example. Even if that is not very likely, when I am creating a program I would still much rather not rely on anything external to my program if I can avoid it.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  4. #4
    Fanatic Member Seraph's Avatar
    Join Date
    Jul 2007
    Posts
    959

    Re: Would you use my own .NET SMTP server ?

    I see; didn't catch what you meant when you said "this is the SMTP server".
    So that people won't have to go through a server.

    Of course I'd be all for that.

    Can I change my vote to option 1?

    And how the heck could anyone say it would be useless.
    There is a difference between it being useless and it being useless to you.

    Visual Studio 2010 Professional | .NET Framework 4.0 | Windows 7

    SERYSOFT.COM :: SysPad - Folder Management Program - Please comment HERE if you find this program useful, have ideas, or know of any bugs.
    [Very useful for IT/DP departments where many folders are consistently accessed. Also contains a scratchpad window for quick access to notes.]

    [.NET and MySQL Quick Guide]

  5. #5

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my own .NET SMTP server ?

    Yeah I thought I might not have explained it very well lol thats why I included the code sample but I guess you could just see that and think that I had some SMTP server I was hosting hard coded into the class.

    Well just to re-iterate for anyone else: What I am talking about making is a class that you can use in your own programs that will send the email directly from your PC to the recipient's email server. It will basically make your PC do the job that the SMTP server you would specify in the SmtpClient.Host property would normally do.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  6. #6
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Would you use my own .NET SMTP server ?

    So let me get this right, you're creating a .Net SMTP class that wraps the current SMTP client in the Framework?

    Your thread title indicates you're going to provide the server for others to connect to to send emails out. What exactly are you making in .Net?
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  7. #7

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my own .NET SMTP server ?

    lol no it doesnt wrap the current smtp client that is already in the framework at all.
    and no I am not going to provide a server for others to connect to - I am providing the SMTP server class itself, so that you dont need to use something like SmtpClient to pass the message to another SMTP server for sending.


    I wanted to keep it brief in the original post but obviously that has led to too much confusion, so I'll explain completely:

    What happens when you use System.Net.Mail.SmtpClient
    You create a new instance of SmtpClient, specify an SMTP server, then send the email right? That SMTP server that you specify can be an internal SMTP server or it can be a public external one like smtp.live.com or smtp.yahoo.com or whatever. What happens is that your program passes the SMTP message to the specified server, then that server uses what is know as an "MX Lookup" to locate the email server that handles emails for the domain you are trying to send an email to. Once it has located this server then it transfers the SMTP message to that server, and then it is up to that server to process it however it wants (for example it might store the message in some kind of mail database - i.e the Information Store in Microsoft's Exchange server).
    EXAMPLE: If you use the built in .NET SmtpClient to send an email to [email protected] and you specify an SMTP server of smtp.gmail.com, this is what happens:
    1. Your program passes an SMTP message to smtp.gmail.com
    2. Gmail's server then uses an MX lookup to determine that the server that handles incoming emails for any @microsoft.com address is mail.messaging.microsoft.com
    3. Gmail's server transfers the message to mail.messaging.microsoft.com
    4. mail.messaging.microsoft.com delivers it to the internal microsoft recipient

    What happens when you use my SMTP server class
    You create an instance of my SmtpSender class, then tell it to send the email. You do not need to specify an SMTP server to pass the message to, because my class will do the MX Lookup itself and will then transfer the SMTP message directly to the recipient's email server. So if we run through the same example as before you can see clearly where the difference is.
    EXAMPLE: If you use my class to send an email to [email protected], this is what happens:
    1. Your program does an MX Lookup to determine that the server that handles incoming emails for any @microsoft.com address is mail.messaging.microsoft.com
    2. Your program transfers the message to mail.messaging.microsoft.com
    3. mail.messaging.microsoft.com delivers it to the internal microsoft recipient


    Understand now?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  8. #8
    Hyperactive Member BadgerBadger's Avatar
    Join Date
    Aug 2009
    Location
    Wales
    Posts
    382

    Re: Would you use my own .NET SMTP server ?

    Do want.

    Heck, I'm sure a lot of people on the net would want a class like this, so take advantage of it! Use it to advertise yourself or something!
    You need a reward for all the work you put into make such a versatile way of sending emails because I bet it wasn't easy.
    "The only thing that interferes with my learning is my education."

  9. #9
    Stack Overflow mod​erator
    Join Date
    May 2008
    Location
    British Columbia, Canada
    Posts
    2,824

    Re: Would you use my own .NET SMTP server ?

    Can you make it open-source?

  10. #10

    Re: Would you use my own .NET SMTP server ?

    I would definitely be interested in it, even if it wasn't to become Open Source. This would make Mail Delivery programs that much easier with your DLL file.

  11. #11

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my own .NET SMTP server ?

    Thanks for the comments guys

    Its not finished yet obviously, but when it is finished I will almost certainly make it open source. I cant say how much longer it is going to take to complete the first version - I've been working on it in my spare time for the last month or so (I do have a full time job to attend to as well ) but doing the MX Lookup and parsing the response from the DNS server is taking a long time, as DNS is a binary protocol so I have to mess around with a lot of bits and bytes etc. Plus I've got to read and understand the extremely exciting DNS and SMTP RFC docs (http://www.faqs.org/rfcs/rfc1035.html and http://www.faqs.org/rfcs/rfc821.html). I might start updating a blog or something with my progress on it just for anyone that is interested.

    Keep the votes coming - the more people that tell me they would probably use something like this, the more likely I am to get it done quicker
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  12. #12
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Would you use my own .NET SMTP server ?

    Quote Originally Posted by chris128 View Post
    lol no it doesnt wrap the current smtp client that is already in the framework at all.
    and no I am not going to provide a server for others to connect to - I am providing the SMTP server class itself, so that you dont need to use something like SmtpClient to pass the message to another SMTP server for sending.


    I wanted to keep it brief in the original post but obviously that has led to too much confusion, so I'll explain completely:

    What happens when you use System.Net.Mail.SmtpClient
    You create a new instance of SmtpClient, specify an SMTP server, then send the email right? That SMTP server that you specify can be an internal SMTP server or it can be a public external one like smtp.live.com or smtp.yahoo.com or whatever. What happens is that your program passes the SMTP message to the specified server, then that server uses what is know as an "MX Lookup" to locate the email server that handles emails for the domain you are trying to send an email to. Once it has located this server then it transfers the SMTP message to that server, and then it is up to that server to process it however it wants (for example it might store the message in some kind of mail database - i.e the Information Store in Microsoft's Exchange server).
    EXAMPLE: If you use the built in .NET SmtpClient to send an email to [email protected] and you specify an SMTP server of smtp.gmail.com, this is what happens:
    1. Your program passes an SMTP message to smtp.gmail.com
    2. Gmail's server then uses an MX lookup to determine that the server that handles incoming emails for any @microsoft.com address is mail.messaging.microsoft.com
    3. Gmail's server transfers the message to mail.messaging.microsoft.com
    4. mail.messaging.microsoft.com delivers it to the internal microsoft recipient

    What happens when you use my SMTP server class
    You create an instance of my SmtpSender class, then tell it to send the email. You do not need to specify an SMTP server to pass the message to, because my class will do the MX Lookup itself and will then transfer the SMTP message directly to the recipient's email server. So if we run through the same example as before you can see clearly where the difference is.
    EXAMPLE: If you use my class to send an email to [email protected], this is what happens:
    1. Your program does an MX Lookup to determine that the server that handles incoming emails for any @microsoft.com address is mail.messaging.microsoft.com
    2. Your program transfers the message to mail.messaging.microsoft.com
    3. mail.messaging.microsoft.com delivers it to the internal microsoft recipient


    Understand now?
    When it's fully explained, yes I'm interested to see the end result of this undertaking.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  13. #13
    Fanatic Member Arve K.'s Avatar
    Join Date
    Sep 2008
    Location
    Kyrksæterøra, Norway
    Posts
    518

    Re: Would you use my own .NET SMTP server class?

    Wow, I think this looks very interesting I am really looking forward to try this
    Last edited by Arve K.; Nov 4th, 2009 at 03:04 PM. Reason: MAJOR typos
    Arve K.

    Please mark your thread as resolved and add reputation to those who helped you solve your problem
    Disclaimer: I am not a professional programmer

  14. #14
    Fanatic Member Seraph's Avatar
    Join Date
    Jul 2007
    Posts
    959

    Re: Would you use my own .NET SMTP server class?

    Looks like you're getting a good review chris

    Visual Studio 2010 Professional | .NET Framework 4.0 | Windows 7

    SERYSOFT.COM :: SysPad - Folder Management Program - Please comment HERE if you find this program useful, have ideas, or know of any bugs.
    [Very useful for IT/DP departments where many folders are consistently accessed. Also contains a scratchpad window for quick access to notes.]

    [.NET and MySQL Quick Guide]

  15. #15

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my own .NET SMTP server class?

    haha lets just hope it works when its finished then, or I'm going to have a lot of disappointed people
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  16. #16

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    Just a quick update: I have started a blog that I will be updating with my progress on this project for anyone who is interested - http://cjwdev.wordpress.com

    Of course I would still appreciate anyone else voting on the poll in this thread to give me a better idea of how many people would use something like this I'll be looking for BETA testers sometime in the near future as well but I'll post that in the appropriate part of the forum nearer the time.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  17. #17
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Would you use my .NET SMTP server class?

    I voted the useless option and I want to tell you why, because it is nothing against you Chris.

    There are two things that I think would cause a lot of issue with this type of class.

    1.) Many ISPs (in the US at least) block outbound port 25 to prevent SPAM bots from running in their network.

    Now I know some US ISPs will let you open this back up if you request it from them and are willing to sign some paperwork, but that is probably more work than it is worth for people who would be using this class.

    2.) If the ISP did allow port 25, many spam blocking lists flag emails from ISPs (basically flagging a whole IP range) who give out dynamic IP addresses. This is to prevent the spam that the port 25 block stopped from point 1.

    I really think that this type of class would be used by people who were targeting home users, so I really think my two points apply. Anyone targeting a business as their clients would know that the business probably has an SMTP server in house (or at least available) to send all of the email.

  18. #18

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    Fair points and I appreciate the input I wasnt aware of any ISPs blocking port 25, mine certainly does not (I'm in the UK though).

    You need port 25 to use the SmtpClient class for the majority of SMTP servers, so this is no different unless you are using an SMTP server that uses a different port... but anyway, it is not really targeted at just home users as finding a usable SMTP server in a business network is not always easy - I know we block all of our internal users from connecting to our Exchange server via SMTP as its incredibly unsecure (all they would need is telnet and then they can send a fake email in about 30 seconds that looks like it is from anyone in the company).

    I appreciate my class will not be suitable for every situation and I never intended for it to be a replacement for using external SMTP servers. There will be times when using SmtpClient is either the only option or is the better option, but at least with my class available people will have the choice. I mean there is nothing to stop someone using this class to just put an option in their program that lets the user specify whether they want to send the email directly from their PC or if they want to pass it to a specific SMTP server - that is how I am intending to use it myself in one of my current projects

    Also, I dont know if I mentioned this in my first post but I originally started making this for the learning experience (and it has taught me a lot already) so even if only a few people find the end result useful then it is still worth me making it publicly available. I just wanted to see how many people would actually find it useful so that I could spend more time on it if a lot of people wanted something like this.

    Oh and I also just found that there are some companies selling components that do the same thing (here's an example: http://www.afterlogic.com/mailbee-ne...-component.asp ). Admittedly they have several other features as well but the fact that they have included the option to do an MX lookup and send directly from your program indicates that some people must want to do that
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  19. #19
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: Would you use my .NET SMTP server class?

    I can respect your points. I guess the answer I would have given if I had a choice is that it is probably useless TO ME.

    For your business point, I guess I can see what you are saying. I thought Exchange had the ability to require authentication when sending mail through the SMTP server, but it has been a while since I have used it, so I could be wrong. Of all of the customers I have deployed solutions to that required an SMTP server, I can only think of one that put up a fight about it.

    Since you are using this for a learning project, I say keep going with it. I am sure some people may find it useful.

    I would be weary of using it in a production application, as I see there could be a whole lot of things that could cause this to not work and it would probably cause more support issues for me than it is worth.

    A couple of points on functionality:
    1.) Make sure you can support greylisting, as it is being used more and more as an Anti-Spam technique.
    2.) Make sure you test with some sort of Virus scanner that has email protection in it. I have seen those screw up more than one email app.

  20. #20
    Member
    Join Date
    Oct 2009
    Location
    Pretoria, South Africa
    Posts
    38

    Re: Would you use my .NET SMTP server class?

    As someone said this class would be home users.

    Well in South Africa. Most id not basically all users have dynamic IP addresses.

    And what i have noticed when setting up local mail servers is that i still have to relay mail as quite a few ISPś dont receive mail from dynamic ip addresses in order to reduce spam.

    However i love the idea. and will still try it when it is complete. I do Still see a use for it.

  21. #21

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    I thought Exchange had the ability to require authentication when sending mail through the SMTP server, but it has been a while since I have used it, so I could be wrong
    Yes it does, but the problem is that any internal user can authenticate with the exchange server because they are on the same domain, so they can therefore send an email from whatever address they want. I've done it before when messing around with colleagues - its funny watching them read an email that looks exactly like it came from the owner of the company and says they are being fired of course they dont usually see the funny side..
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  22. #22
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Would you use my .NET SMTP server class?

    Hey,

    Sounds interesting!! I will take a look when its done.

    Gary

  23. #23

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    Thanks Gary, havent had much spare time recently to do any work on this but hoping to pick it back up next week
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  24. #24
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Would you use my .NET SMTP server class?

    Good stuff.

    Have you thought about putting it up on CodePlex just now? That way you could get people collaborating on it.

    Gary

  25. #25

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    Dunno, I've never used Codeplex before. To be honest I'd rather write it all myself anyway
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  26. #26
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Would you use my .NET SMTP server class?

    Hey,

    No worries, it was just a thought. just when you said you were going to make it open source, it made sense (in my head anyway) to pt it on somewhere like codeplex, that way you get the benefit of source at the least, and collaboration, if you wanted.

    Gary

  27. #27
    Fanatic Member Seraph's Avatar
    Join Date
    Jul 2007
    Posts
    959

    Re: Would you use my .NET SMTP server class?

    Hmm, I am currently working on a small program that runs in the system tray and allows a person to manage a contact list and send emails.
    I originally was jut going to support GMail since it was just for me and a friend.
    But, I have since thought to expand it to yahoo and hotmail SMTP support.

    However, I really think what I should do (and I dunno what took me so long to think of this since I already knew you were working on this) is to use your SMTP class and just send emails with the Reply To "field" defining where there email essentially came from. Then a user could just add an email they want the recipient to be able to respond to instead of needing login information like I am currently using. This would help with account security and make this program much simpler that I am working on.

    So, I am definitely up for using this.

    Also, were you planning on allowing more than just port 25 usable? Just in case it's blocked?

    Visual Studio 2010 Professional | .NET Framework 4.0 | Windows 7

    SERYSOFT.COM :: SysPad - Folder Management Program - Please comment HERE if you find this program useful, have ideas, or know of any bugs.
    [Very useful for IT/DP departments where many folders are consistently accessed. Also contains a scratchpad window for quick access to notes.]

    [.NET and MySQL Quick Guide]

  28. #28

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    Yeah you can make it use any port you want, obviously the receiving server has to support incoming SMTP requests on that port though. Had a hectic weekend buying a new car and passing my motorbike test so didnt get chance to do any more work on this I'm afraid

    EDIT: Updated progress can be found on my blog http://cjwdev.wordpress.com
    Last edited by chris128; Jan 15th, 2010 at 11:52 AM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  29. #29

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    Just to let anyone know that has been following this, I have nearly got it to BETA stage now. However, there is a problem with sending emails to free public email services such as hotmail/gmail/yahoo etc from my class as these public email services do not allow dynamic IP addresses (the type of IPs that are assigned to home user's internet connections) to submit emails to them. This is basically what Negative0 mentioned in post #17.

    There is nothing I can do about this unfortunately - for more info look at the "Cjwdev.Mail Progress Report 4" post on http://cjwdev.wordpress.com
    Last edited by chris128; Jan 17th, 2010 at 08:33 PM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  30. #30
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Would you use my .NET SMTP server class?

    Hey,

    I actually ran into this issue the other night when I was trying to set up the mail server on my server. I am used to having a static IP address, but recently switched provider, and am back to Dynamic IP address. When I tested, I got a response from Hotmail, which directed me to the following:

    http://www.microsoft.com/mscorp/safe...d/default.mspx

    I haven't read all of the content yet, but it seems like this is something that might help with this issue. Have you looked into this at all?

    Gary

  31. #31
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Would you use my own .NET SMTP server ?

    Quote Originally Posted by chris128 View Post
    You do not need to specify an SMTP server to pass the message to, because my class will do the MX Lookup itself and will then transfer the SMTP message directly to the recipient's email server.
    I'm a bit curious, how it is done in your case? Can you give a little more details, especially when the domain name provided in my e-mail and the domain name of the SMTP server are not the same (it an actual working configuration of one of my e-mails).

  32. #32

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my own .NET SMTP server ?

    Quote Originally Posted by cicatrix View Post
    I'm a bit curious, how it is done in your case? Can you give a little more details, especially when the domain name provided in my e-mail and the domain name of the SMTP server are not the same (it an actual working configuration of one of my e-mails).
    When you say "the domain name provided in my e-mail and the domain name of the SMTP server are not the same" what do you mean by "my e-mail" ? Do you mean the email address you are sending to? If so then that is not a problem because the MX records (http://en.wikipedia.org/wiki/MX_record) for your domain will tell my code (and any other server trying to send you emails) where to send the mails. This process is known as an MX Lookup and it is how SMTP servers know where to send emails. Have a look at the Cjwdev.Mail.SmtpSender post on here for a basic diagram: http://cjwdev.wordpress.com/category/cjwdev-mail/ - the DNS Server is what is responsible for returning the MX Lookup results and with my class you can either specify your own DNS server or you can have it automatically detect the DNS servers that your PC is currently using.

    I actually ran into this issue the other night when I was trying to set up the mail server on my server. I am used to having a static IP address, but recently switched provider, and am back to Dynamic IP address. When I tested, I got a response from Hotmail, which directed me to the following:

    http://www.microsoft.com/mscorp/safe...d/default.mspx

    I haven't read all of the content yet, but it seems like this is something that might help with this issue. Have you looked into this at all?
    Yeah that would help if this was just for my use, but as this code could potentially be run from any IP and any domain name etc then its not something I can use unfortunately
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  33. #33
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Would you use my .NET SMTP server class?

    Hey Chris,

    I understand that this wouldn't work for the class that you are going to be shipping, but I thought people should be made aware of it, so that they can implement if they need it.

    I was also curious if this technique worked for you, as I need to find a way around this.

    Gary

  34. #34
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Would you use my own .NET SMTP server ?

    Quote Originally Posted by chris128 View Post
    Do you mean the email address you are sending to? If so then that is not a problem because the MX records.
    No, mmm, I mean how does it figure out my smtp server? Or should I specify it somewhere?
    Say I have an email address '[email protected]', but my smtp server is a.bcd.com.

  35. #35
    Fanatic Member
    Join Date
    Oct 2007
    Posts
    544

    Re: Would you use my .NET SMTP server class?

    I am very interested. Isn't there a .net code somewhere in the framework that do this sort of thing?

    Or what about using mercury?

  36. #36

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    No, mmm, I mean how does it figure out my smtp server? Or should I specify it somewhere?
    Say I have an email address '[email protected]', but my smtp server is a.bcd.com.
    You dont understand - it doesnt matter what your domain name is, every domain name that can receive emails will have MX Records, and these MX Records will point to the SMTP server that is responsible for receiving emails for that domain. Enter your domain name into this website and it will show you the MX records for your domain: http://www.mxtoolbox.com/
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  37. #37

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    Quote Originally Posted by teguh123 View Post
    I am very interested. Isn't there a .net code somewhere in the framework that do this sort of thing?

    Or what about using mercury?
    See my explanation of the difference between my class (SmtpSender) and the .NET framework class (SmtpClient) here: http://cjwdev.wordpress.com/2009/11/...vs-smtpclient/

    As for using Mercury, from what I understand that is basically a stand alone application that runs an SMTP server - I dont know about you but if I just want to send an email from my application I dont want to have to turn my user's PC into a full blown SMTP server that is active all of the time.
    Last edited by chris128; Jan 18th, 2010 at 08:40 AM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  38. #38
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Would you use my .NET SMTP server class?

    Quote Originally Posted by chris128 View Post
    You dont understand - it doesnt matter what your domain name is, every domain name that can receive emails will have MX Records, and these MX Records will point to the SMTP server that is responsible for receiving emails for that domain. Enter your domain name into this website and it will show you the MX records for your domain: http://www.mxtoolbox.com/
    Oh, I got it. Slow thinking, I guess. Thanks for your patience though.

  39. #39

    Thread Starter
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Would you use my .NET SMTP server class?

    No worries, I dont expect everyone to know how SMTP / DNS works
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  40. #40

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width