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
-
I would probably give it a go when it is complete
-
I am not really interested myself but it sounds like a good idea
-
I think it would be useless
-
Jan 18th, 2010, 08:57 AM
#41
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.
-
Jan 18th, 2010, 06:09 PM
#42
Lively Member
Re: Would you use my .NET SMTP server class?
Would be nice to try. Hope you find time and passion
FORZA ROSSONERI! CAMPIONI!!!
-
Jan 22nd, 2010, 11:58 AM
#43
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
-
Jan 22nd, 2010, 05:45 PM
#44
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
-
Jan 22nd, 2010, 06:14 PM
#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
-
Jan 22nd, 2010, 07:00 PM
#46
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.
-
Jan 22nd, 2010, 09:20 PM
#47
Re: Would you use my .NET SMTP server class?
Sounds like a cool project.
-
Jan 23rd, 2010, 09:13 AM
#48
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
-
Jan 23rd, 2010, 03:05 PM
#49
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
-
Jan 24th, 2010, 07:20 AM
#50
Re: Would you use my .NET SMTP server class?
Problems? I am expecting a flawless user experience
-
Jan 30th, 2010, 11:50 AM
#51
Re: Would you use my .NET SMTP server class?
 Originally Posted by gep13
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?
-
Jan 30th, 2010, 12:27 PM
#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....
-
Jan 31st, 2010, 03:44 PM
#53
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
-
Jan 31st, 2010, 03:57 PM
#54
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.
-
Jan 31st, 2010, 05:39 PM
#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.
-
Feb 9th, 2010, 10:15 PM
#56
Re: Would you use my .NET SMTP server class?
With this code:
vb.net Code:
Try
Dim c As New SmtpSender()
Dim m As New SmtpEmail()
m.Body = Me.txtFeedback.Text
m.Sender = Me.txtEmail.Text
m.Subject = "User Feedback - From " & IIf(Me.txtName.Text <> "", Me.txtName.Text, "Anonymous User")
c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body)
MessageBox.Show("Your feedback has been sent. Thank you.", "Feedback Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)
Me.txtFeedback.Clear()
Me.Height = HEIGHT_1
Catch
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)
End Try
It just freezes on c.SendEmail(). No exception thrown, no messageboxes.
-
Feb 9th, 2010, 10:24 PM
#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).
-
Feb 10th, 2010, 01:45 PM
#58
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
-
Feb 10th, 2010, 01:48 PM
#59
Fanatic Member
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]
-
Feb 10th, 2010, 02:17 PM
#60
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
-
Feb 10th, 2010, 02:33 PM
#61
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.
-
Feb 10th, 2010, 02:33 PM
#62
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?
-
Feb 10th, 2010, 02:43 PM
#63
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
-
Feb 10th, 2010, 03:17 PM
#64
Re: Would you use my .NET SMTP server class?
 Originally Posted by ForumAccount
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.
-
Feb 10th, 2010, 03:19 PM
#65
Re: Would you use my .NET SMTP server class?
 Originally Posted by minitech
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
-
Feb 10th, 2010, 03:25 PM
#66
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.
-
Feb 10th, 2010, 03:31 PM
#67
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
-
Feb 10th, 2010, 03:34 PM
#68
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:
Try
Dim c As New SmtpSender()
Dim m As New SmtpEmail()
m.Body = "test message body"
m.Subject = "User Feedback - TEST"
c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body)
MessageBox.Show("Your feedback has been sent. Thank you.", "Feedback Sent", MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As Exception
MessageBox.Show("There was a problem while sending your feedback. - " & ex.Message, "Feedback Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
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:
For Each SendResult As SendEmailResult In c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body)
If SendResult.Result = OutboundSmtpSession.SessionResult.MessageSubmittedSuccessfully Then
MessageBox.Show("Message sent to " & SendResult.Recipient & " successfully")
Else
MessageBox.Show("Error sending message - " & SendResult.ErrorInformation)
End If
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.
-
Feb 10th, 2010, 03:50 PM
#69
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
-
Feb 10th, 2010, 04:07 PM
#70
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.
-
Feb 10th, 2010, 04:18 PM
#71
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
-
Feb 10th, 2010, 04:25 PM
#72
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)
-
Feb 10th, 2010, 04:29 PM
#73
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
-
Feb 10th, 2010, 04:49 PM
#74
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
-
Feb 10th, 2010, 05:05 PM
#75
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
-
Feb 10th, 2010, 05:10 PM
#76
Fanatic Member
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]
-
Feb 10th, 2010, 05:12 PM
#77
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
-
Feb 10th, 2010, 10:09 PM
#78
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:
Imports Cjwdev.Mail Imports Cjwdev.Dns Imports System.Windows.Forms Module Module1 Sub Main() Try Dim c As New SmtpSender() Dim m As New SmtpEmail() m.Body = "test message body" m.Subject = "User Feedback - TEST" c.SendEmail(m.Sender, m.Recipients, m.Subject, m.Body) MessageBox.Show("Your feedback has been sent. Thank you.", "Feedback Sent", MessageBoxButtons.OK, MessageBoxIcon.Information) Catch ex As Exception MessageBox.Show("There was a problem while sending your feedback. - " & ex.Message, "Feedback Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End Try End Sub End Module
-
Feb 11th, 2010, 06:51 AM
#79
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
-
Feb 11th, 2010, 02:06 PM
#80
Re: Would you use my .NET SMTP server class?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|