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 2 of 3 FirstFirst 123 LastLast
Results 41 to 80 of 115

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

  1. #41

    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?

    It will send an email to any SMTP server that complies with the SMTP RFC specification (http://www.ietf.org/rfc/rfc2821.txt) and as Exchange complies with that, then yes it can send an email to an Exchange server.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  2. #42
    Lively Member
    Join Date
    Nov 2006
    Posts
    67

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

    Would be nice to try. Hope you find time and passion
    FORZA ROSSONERI! CAMPIONI!!!

  3. #43

    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, as it happens I have had a bit of spare time in the last few days and have got this to a stage where I can let people test it (see http://cjwdev.wordpress.com/2010/01/...-alpha-release) so I'll post the download link on my blog tonight and anyone interested can try it out
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  4. #44

    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?

    Download link for the Alpha release is now in the latest blog post anyone who tries it out please let me know how you get on with it and any comments or suggestions you have, no matter how small, will be appreciated. Thanks
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  5. #45

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

    I think I sent you a test email...I figured out the problem, so ignore the other email about the problem...it appears your dll is not 64 bit friendly

  6. #46

    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?

    Ah I just replied to your email telling you to change the project to target x86 before I saw this post. I havent received any other emails though, what address did you send the test to?

    EDIT: I've uploaded "64-bit friendly" versions to replace the x86 versions that were in the download before, the DLLs should work no matter which architecture you are targetting now
    Last edited by chris128; Jan 22nd, 2010 at 07:04 PM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  7. #47
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

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

    Sounds like a cool project.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

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

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

    Chris,

    I am going to give this a try at some point, the only issue is that I am on a dynamic IP address, so won't be able to validate at home, will likely give it a try at work.

    Will let you know how I get on.

    Gary

  9. #49

    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?

    OK thanks - if you can let me know any problems you encounter or any suggestions you have, would be most appreciated
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


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

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

    Problems? I am expecting a flawless user experience

  11. #51

    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 gep13 View Post
    Problems? I am expecting a flawless user experience
    haha well I dont know about that...
    Did you (or anyone else) get chance to try it out yet?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  12. #52

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

    I tried it out again, but it was awhile back. I'll have to redownload so I can get the 64bit friendly DLL's. Perhaps I'll write a test program for the DLL's for other's to try out....

  13. #53
    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,

    Sorry Chris, no, I haven't had a chance yet, too many things on at the minute, planning a wedding, working too hard etc!!

    Will definitely take a look though!

    Gary

  14. #54

    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, just thought I would ask in case you had tried it but forgotten to let me know how it went

    @formelsstree4, that would be cool if you could - be interesting to see exactly how other people (ie you in your demo app) actually use the class as well.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  15. #55

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

    It would be a rather crappy demo, but I'll get one done soon
    I like the fact that Intellisense is actually helpful. Makes coding easier.

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

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

    With this code:
    vb.net Code:
    1. Try
    2.             Dim c As New SmtpSender()
    3.             Dim m As New SmtpEmail()
    4.             m.Body = Me.txtFeedback.Text
    5.             m.Recipients.Add("[email protected]")
    6.             m.Sender = Me.txtEmail.Text
    7.             m.Subject = "User Feedback - From " & IIf(Me.txtName.Text <> "", Me.txtName.Text, "Anonymous User")
    8.             c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body)
    9.             MessageBox.Show("Your feedback has been sent. Thank you.", "Feedback Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)
    10.             Me.txtFeedback.Clear()
    11.             Me.Height = HEIGHT_1
    12.         Catch
    13.             MessageBox.Show("There was a problem while sending your feedback. You can still send an e-mail to [email protected]; we'll try to get back to you as soon as possible. Enjoy the game!", "Feedback Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
    14.         End Try

    It just freezes on c.SendEmail(). No exception thrown, no messageboxes.

  17. #57

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

    How long do you wait? It takes it a bit to send the message. When I sent a test one it took it a little over 15 seconds to send (on a 2.1GHZ 64bit Win 7 ultimate laptop).

  18. #58

    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 for trying it out minitech, I'll take a look at that problem later tonight but I cant see any reason why it wouldnt throw an exception (it wont be able to actually send the email if gmail block dynamic IPs and you are sending from a home broadband connection thought - see this post for details: http://cjwdev.wordpress.com/2010/01/...ress-report-4/ ).

    Oh and the spec of your PC wont make any (well very little) difference to how long it takes to send the email as its all down to how long it takes your DNS server and the remote SMTP server to respond
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


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

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

    Just for reference, hopefully, soon, I will be able to put this in a project I'm working on. If the project pans out as hoped. If this other project is halted, there is another program I made that would benefit from it, I just haven't taken the time to fix it for use with this.

    But, just to let you know that I should be getting my hand on it soon.

    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]

  20. #60

    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, look forward to hearing any feedback you might have if you do try it out
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  21. #61
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

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

    Why don't you have an overload of the SmtpSender.Send method that accepts a SmtpEmail? Or enumerable of them? At the moment the SmtpEmail is useless because you can't send that class with any methods. You can see that in Minitech's example, he creates the class, but then has to send the email using the values from the class.

    I also have a dynamic IP, but I'll try to test it somehow.

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

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

    Yeah, I waited about 3 minutes. It takes 5 seconds to send with Net.Mail.

    I read your post, does that mean I can't send to my GMail account?

  23. #63
    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,

    This isn't a failing of Chris's code in anyway. This is a restriction placed at the receiving end, i.e GMail, in order to try to prevent spam email.

    Gary

  24. #64

    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 ForumAccount View Post
    Why don't you have an overload of the SmtpSender.Send method that accepts a SmtpEmail? Or enumerable of them? At the moment the SmtpEmail is useless because you can't send that class with any methods. You can see that in Minitech's example, he creates the class, but then has to send the email using the values from the class.

    I also have a dynamic IP, but I'll try to test it somehow.
    yeah thats on my list of things to do at the moment the SmtpEmail class is just used internally within the SmtpSender and SmtpSession classes. I did consider letting people pass in a System.Net.Mail.MailMessage but it has quite a few properties that my SmtpSender will not support so it seemed better and less confusing for users of the DLL if I just created my own email message class specifically for use with my SmtpSender class.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  25. #65

    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 minitech View Post
    Yeah, I waited about 3 minutes. It takes 5 seconds to send with Net.Mail.

    I read your post, does that mean I can't send to my GMail account?
    Yeah if you are on a dynamic IP that is on google's blacklist then you wont be able to I'm afraid. Either way, it should have thrown an exception to tell you why the email couldnt be sent if it is being blocked by google's SMTP servers so I'll look into that
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


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

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

    I'm not on a dynamic IP, so I'm not sure about that. I'm using Windows XP, VS 2005, .NET 3.5.

    P.S. I didn't mean his code was failing, I was just replying to formlesstree4.

  27. #67

    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?

    You realise I mean a dynamic external IP yeah? Your internal network IP does not make a difference (sorry not sure how familiar you are with IP addresses / networking). The vast majority of home broadband services put you on a dynamic external IP.

    Oh and my code is failing if its just hanging and not throwing an exception :P just gonna test your code example out now and see whats up
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  28. #68

    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?

    Hmm I just tried it, changed a couple of minor things just so it would run without me needing to create some text boxes etc and it worked fine. Did you receive the test email I sent by it?

    Here's the exact code I used:
    vb Code:
    1. Try
    2.             Dim c As New SmtpSender()
    3.             Dim m As New SmtpEmail()
    4.             m.Body = "test message body"
    5.             m.Recipients.Add("[email protected]")
    6.             m.Sender = "[email protected]"
    7.             m.Subject = "User Feedback - TEST"
    8.             c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body)
    9.             MessageBox.Show("Your feedback has been sent. Thank you.", "Feedback Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)
    10.         Catch ex As Exception
    11.             MessageBox.Show("There was a problem while sending your feedback. - " & ex.Message, "Feedback Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
    12.         End Try

    What happens if you copy and paste that code and try it exactly as it is?

    Also, rather than just calling the SendEmail method and then assuming that if no exception was thrown the email was sent successfully, you should use the list of results that the method returns, like so:
    vb Code:
    1. For Each SendResult As SendEmailResult In c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body)
    2.                 If SendResult.Result = OutboundSmtpSession.SessionResult.MessageSubmittedSuccessfully Then
    3.                     MessageBox.Show("Message sent to " & SendResult.Recipient & " successfully")
    4.                 Else
    5.                     MessageBox.Show("Error sending message - " & SendResult.ErrorInformation)
    6.                 End If
    7. Next
    The reason I made it like this is because if you are sending an email to a list of several people then you dont want it to just throw an exception if one of them fails because then the rest will not receive the email (or you will have no way of knowing if the others sent successfully even if it did still send them). It will only throw an exception if one of the arguments passed to the method is invalid or if you set the SMTP port to less than 0 or if you manually specified a DNS server but the IP address is not valid etc. The example on this blog post mentions most of this http://cjwdev.wordpress.com/2010/01/...alpha-release/
    Last edited by chris128; Feb 10th, 2010 at 04:01 PM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  29. #69
    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,

    Just give you assembly a very quick trial, and seems like it works

    Knocked up a very simple Console Application, using your blog post here:

    http://cjwdev.wordpress.com/2010/01/...alpha-release/

    Created a recipient list of two recipients, one a hotmail account, and one my work account. I have a dynamic IP address, so I was expecting hotmail to whine, which it did, but my work address went through fine, although ended up in my Junk Email folder.

    Will keep playing with it, and see if I run into any problems, but so far so good.

    Gary

  30. #70

    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?

    Cool thanks a lot for testing it out As for it ending up in the junk folder, I believe that is a result of me not adding any headers to the emails that are sent yet. Even when you use SmtpClient it adds about 7 or 8 headers by default, where as mine only adds these 3: To, From and Subject. I'm planning to keep those 3 as being automatically added by my internal code but have several other headers included by default that the user of the class can remove if they want and also add their own.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


  31. #71
    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,

    That sounds like it would make sense. Is that going to be in the next release? Are you planning on sharing the source by the way? Where are you hosting it just now? Just curious.

    Gary

  32. #72

    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 I'll make the source available for download, just not until the first 'proper' release cos there are still a lot of things I want to tidy up and extra bits to add/fix while it is being tested. I'm not hosting the source anywhere at the moment, just on my hard drive

    Oh and yeah the headers thing will be in the next release (which will be the BETA)
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


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

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

    What, no version control?!?

    Cool, will look forward to the beta release. Right, away to download the RC of Visual Studio 2010. Talk to you later.

    Gary

  34. #74

    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?

    the only version control I have is incrementing the Version number after I make any significant modifications to the code
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


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

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

    Ha ha, noice

    On a serious note, if you haven't already, check out:

    http://www.visualsvn.com/server/

    It's a snap to install, and very easy to use.

    Gary

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

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

    Nice. I'll have to look into this.
    BTW, real quick, since we are on an SVN rabbit trail here, does anyone know of anything that turns your own webhost into an SVN of sorts?
    I'd like to upload my versions of my program to an SVN, but would like to upload it to my own webhost provider and link to it that way through my own website.

    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]

  37. #77
    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 use Redmine as a web front end for my SVN Server:

    http://www.redmine.org/

    That gives me access to view the repository, and assign tickets etc to code. However, I just use TortoiseSVN to upload changes directly to the repo which is hosted under Apache on my server.

    Gary

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

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

    Nope, nothing's happening. No exceptions. I don't think a For...Each loop would help (actually, I'm certain) because the SendMail() function never returns. Here's my complete code:
    vb.net Code:
    1. Imports Cjwdev.Mail
    2. Imports Cjwdev.Dns
    3. Imports System.Windows.Forms
    4. Module Module1
    5.  
    6.     Sub Main()
    7.         Try
    8.             Dim c As New SmtpSender()
    9.             Dim m As New SmtpEmail()
    10.             m.Body = "test message body"
    11.             m.Recipients.Add("[email protected]")
    12.             m.Sender = "[email protected]"
    13.             m.Subject = "User Feedback - TEST"
    14.             c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body)
    15.             MessageBox.Show("Your feedback has been sent. Thank you.", "Feedback Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)
    16.         Catch ex As Exception
    17.             MessageBox.Show("There was a problem while sending your feedback. - " & ex.Message, "Feedback Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
    18.         End Try
    19.     End Sub
    20.  
    21. End Module

  39. #79

    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 the for each loop wouldnt help with this problem, I was just telling you that for future reference

    I'll make a debug build that logs exactly what it is doing all the way through the process and send you a link later today, then you can try it again (if you dont mind) and we can see where it is getting stuck
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

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


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

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

    Ok. Thanks!

Page 2 of 3 FirstFirst 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