Cjwdev.Mail Alpha Release Download Available

January 22, 2010 — 27 Comments

As mentioned in the previous post, the Cjwdev.Mail.SmtpSender class is now ready for public testing. See below for download link and instructions. If you dont know what this SmtpSender class is, you can read all about it here: SmtpSender Class Description

You can download the alpha (pre BETA) release here: http://www.cjwdev.co.uk/DeveloperComponents/Cjwdev-Mail/CjwdevMail-0-0-1-0.zip

This ZIP file contains 2 DLLs, MxResolver.dll and SmtpSrv.dll – to use the SmtpSender class you just need to add a reference to the SmtpSrv.dll file. Ensure that the MxResolver.dll file is in the same directory that you are using SmtpSrv.dll from though, as this DLL uses methods and classes from the MxResolver library that I have also written (I may combine both into a single DLL for the next release). Also, if you want to see the descriptions for methods and properties etc in Intellisense when working with my classes, make sure you have the two XML files (that are included in the download) in the same directory as well.

Once you have added the reference, you can access the SmtpSender class via the Cjwdev.Mail namespace. For example:

Dim MySmtpSender As New Cjwdev.Mail.SmtpSender()

Before using the class, please see this post for a couple of quick examples of how to use it to send an email and check the status of the sent email: SmtpSender Examples and this post for an important notice regarding sending to hotmail/gmail/yahoo addresses: Problems sending to public email services

I would also recommend that you always set the LocalIdentifier property of the SmtpSender class before attempting to use it to send an email, as some email servers require this ID before they will let you submit email to them. In future releases I will probably make it so that if you dont set this explicitly then it just gets set to the computer name that the code is running on.

So basically I’m just hoping some of you reading this would be willing to download the class and give it a go – try using it to send emails to as many different domains as you can (where you can confirm that the recipient received the email) and let me know which ones worked, which ones didnt, what errors you got etc. I would love to hear feedback from anyone that uses this, but please dont forget that this is an Alpha release and as such there are bound to be a few bugs/problems – please inform me of any you find by either posting a comment here or emailing me at cwright [at] cjwdev [dot] co [dot] uk

Thanks, Chris

27 responses to Cjwdev.Mail Alpha Release Download Available

  1. 

    Awesome, glad it’s out!

    • 

      let me know any feedback at all that you have if you try it out 🙂 I’ll continue to work on it but I’m sure some bugs will only be found through other people testing it.

  2. 

    Sweet. I’ll try it out tonight and see what I get! 🙂

  3. 

    I definitely have some bugs; see VBForums.

  4. 

    I’m putting this in a production product 🙂

    Is development still going on, or are you going to abandon the product?

    • 

      Hi Ryan,
      I’ll be honest I’m not going to get chance to do any more work on this for a long time (if ever). If you want the full source code so that you can improve/fix it yourself then send me an email and I’ll send you it.
      Cheers
      Chris

  5. 

    Chris,

    Well done.

    Please send me a copy of the code. I would like to be able to add attachments to it (inside the body or as a file).

    Thanks.

    • 

      I can send you the code, but I’ll warn you now adding attachments is not an easy thing to do. Also just to clarify, you can just use the built in .NET classes for sending emails in the System.Net.Mail namespace (and they will let you add attachments easily) but they require an SMTP server to be specified where as my code does not. Bearing in mind I wrote this code a long time ago and it was never really finished, I’d recommend just using the built in .NET stuff unless you know there’s no way the user of your program will have an SMTP server available to be used.

  6. 

    Chris,

    When I use the ‘SendEmailResult’ I get the following compile error:
    ‘type ‘SendEmailResult’ is not defined’. I have referenced the the smtpsrv and the mxresolver dlls.

    Where did I go wrong?

    Thanks

    • 

      Well you have to fully qualify the name if you haven’t imported the cjwdev.mail namespace (e.g you’d need to declare it as Cjwdev.Mail.SendEmailResult) . That’s just basic .NET behaviour though, nothing specific to do with my code.

  7. 

    Thanks.

    I like the idea of not having to have a SMTP server. Please send me the code. I have been looking to do this for some time (send emails directly).

  8. 

    I get following error:

    SmtpError
    The server did not send the standard 220 code to indicate that it is ready.
    The response from the server was: 421
    Cannot connect to SMTP server 66.96.142.52 (66.96.142.52:25), connect timeout

    • 

      Well that means exactly what it says… the SMTP server that it tried to transfer the email to didn’t respond with the normal “OK” message, instead it responded with 421 which according to a quick google search means “service not available”. Not a lot I can do about that 🙂 Have you read this post about some SMTP servers blocking you if you are on a domestic IP address rather than a business IP address: https://cjwdev.wordpress.com/2010/01/18/cjwdev-mail-progress-report-4/

  9. 

    Thanks. Is there a way to send email from home then?

  10. 

    Will you email me your code?

  11. 

    Please send it to the email that I use to posted here. Thanks.

  12. 

    Hi, thanks for the library, I’ve been testing with it and managed to get it up and running and delivering emails, however, the emails do not contain a body even though one is specified.
    I realise the code is only alpha and it was posted over two years ago but do you know the emails do not contain a body?

    • 

      Hey, no I’ve no idea why that would be happening… I’ve sent a few test emails using it and the body came through fine. I only ever tried plain text, no HTML or anything, is that what you are doing?

      • 

        No I was just using plain text, I even used the sample code that you posted on this site and that does the same.
        The message header indictaes a plain text email (Content-Type: text/plain)

        It is strange because the Subject works fine and the mail arrives within a couple of seconds which is great.
        I thought it could have been the receiving server (Exchange 2010) doing something funny but even sending to other personal addresses produces the same results.

        Would it be possible to get the source so I can take a look?

      • 

        That’s really odd, I’ve just sent a test email now to my hotmail address and the body came through fine. If you send me an email (cwright at cjwdev dot co dot uk) I’ll send you the source code.

  13. 

    I’d like to get the source code for this project. Can you send it to my email address that I used to post?

  14. 

    Hi, seems like a very interesting project. Could I get the source somewhere? The download link does not work anymore. Thank you very much.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s