-
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.
-
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?
-
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
-
Re: Would you use my .NET SMTP server class?
Quote:
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.
-
Re: Would you use my .NET SMTP server class?
Quote:
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
-
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.
-
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
-
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/
-
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
-
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.
-
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
-
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)
-
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
-
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 :D
-
Re: Would you use my .NET SMTP server class?
Ha ha, noice :D
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
-
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.
-
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
-
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
-
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
-
Re: Would you use my .NET SMTP server class?
-
Re: Would you use my .NET SMTP server class?
OK see the following link for a debug version that will output plenty of information to the Immediate Window (just using Debug.WriteLine) : http://www.cjwdev.co.uk/DeveloperCom...EBUG-BUILD.zip
When I use the code I posted a couple of posts back and run it with these debug versions of the DLLs, I see the following in my Immediate Window:
Code:
SendEmail method called, performing property/argument validation...
Property/argument validation complete
Starting loop through recipients...
Starting send for [email protected] ...
Checking recipient domain name is valid...
Recipient domain validation complete
Creating DnsClient instance (DNS server 192.168.0.254) ...
DnsClient instance created
Performing MX lookup for gmail.com ...
Sent MX record lookup for gmail.com
Sent A record lookup for alt3.gmail-smtp-in.l.google.com
Sent A record lookup for alt2.gmail-smtp-in.l.google.com
Sent A record lookup for alt1.gmail-smtp-in.l.google.com
Sent A record lookup for alt4.gmail-smtp-in.l.google.com
Sent A record lookup for gmail-smtp-in.l.google.com
MX lookup complete, 5 MX records found
Starting loop through MX records...
Starting loop through email server IP addresses in this record...
Initiating connection with remote SMTP server 209.85.220.29 on worker thread...
Checking to see if initial connection was successful...
Initial connection was successful, set wait signal and wait for this thread to be unblocked by the worker thread...
No previous SMTP command sent, sending EHLO command...
Last SMTP command sent: Ehlo
Last SMTP command sent: MailFrom
Last SMTP command sent: RcptTo
Last SMTP command sent: DataCommand
Last SMTP command sent: Data
No errors reported from server - classing message as being submitted successfully
Ending SMTP session for the following reason: MessageSubmittedSuccessfully
Unblocking original thread...
Worker thread unblocked original thread, checking session result
Loop through mail server IP addresses complete
Loop through MX records complete
Loop through recipients complete, returning result list to caller of SendEmail method
Can you try running it and post exactly what you get in the Immediate Window? Thanks
-
Re: Would you use my .NET SMTP server class?
I suggest to mask e-mail addresses (unless you want another ton of spam) :D
-
Re: Would you use my .NET SMTP server class?
I get no spam right now, so I feel very left out. Nothing in my Junk Mail/Spam folder either. I just don't get any. That's something I don't know anything about. I wish I would get some for a change.
-
Re: Would you use my .NET SMTP server class?
I ran the debug dll's and...nothing showed in the Immediate Window when I used them which makes no sense. I originally had the code on a Background Thread, so I moved it back and still got nothing.
If it helps, here's the code:
vb.net Code:
Public Class Form1
Dim Smtp As New Cjwdev.Mail.SmtpSender()
Dim WithEvents SendMail As New System.ComponentModel.BackgroundWorker
Dim msg As String = String.Empty
Dim FromEmail As String = String.Empty
Dim Subject As String = String.Empty
Dim ToEmail As String = String.Empty
Dim thread As System.Threading.Thread
Dim WithEvents timer As New System.Timers.Timer With {.Interval = 100, .AutoReset = True}
Private Sub SendOut()
Dim emailList As New List(Of String)
emailList.Add(ToEmail)
Try
Smtp.SendEmail(FromEmail, emailList, Subject, msg)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
Private Sub SendBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SendBtn.Click
If (FromEmailBox.Text <> String.Empty) AndAlso (ToFieldBox.Text <> String.Empty) AndAlso (SubjectBox.Text <> String.Empty) AndAlso (SendMessageBox.Text <> String.Empty) Then
msg = SendMessageBox.Text
FromEmail = FromEmailBox.Text
Subject = SubjectBox.Text
ToEmail = ToFieldBox.Text
AnimationBar.Style = ProgressBarStyle.Marquee
SendBtn.Enabled = False
'thread = New Threading.Thread(AddressOf SendOut)
'thread.IsBackground = True
'thread.Start()
Call SendOut()
'timer.Enabled = True
End If
End Sub
Private Delegate Sub d_EnableControls()
Private Sub enableControls()
SendBtn.Enabled = True
AnimationBar.Style = ProgressBarStyle.Blocks
timer.Enabled = False
End Sub
Private Sub timer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles timer.Elapsed
If Not thread.IsAlive Then
Me.Invoke(New d_EnableControls(AddressOf enableControls))
End If
End Sub
End Class
You can see where I commented out a few things here and there to move it back to the UI thread.
-
Re: Would you use my .NET SMTP server class?
Hmm that is odd... I'll rebuild the debug DLLs and have them just write to a text file rather than using Debug.WriteLine. I'll edit this post when I've uploaded the new ones.
EDIT: OK try downloading the files again (using the same link as I posted in the last post) and running it again. Its just set to write to a text file named DebugLog.txt in the directory that the program is running from, so if you are testing this from within VS then it will be in the Bin\Debug folder of your solution. Let me know how it goes :)
Also, Formlesstree - are you saying that when you tried to send an email it did the same as what minitech is seeing? Or were you just trying out the debug files and commenting on the debug logging not working but the email still actually sent ok?
-
Re: Would you use my .NET SMTP server class?
Did the same as Minitech, nothing happened.
EDIT: Downloaded the update..got this:
Code:
2/12/2010 5:29:09 PM SendEmail method called, performing property/argument validation...
2/12/2010 5:29:09 PM Property/argument validation complete
2/12/2010 5:29:09 PM Starting loop through recipients...
2/12/2010 5:29:09 PM Starting send for ***@yahoo.com ...
2/12/2010 5:29:09 PM Checking recipient domain name is valid...
2/12/2010 5:29:09 PM Recipient domain validation complete
2/12/2010 5:29:09 PM Creating DnsClient instance (DNS server 10.0.0.1) ...
2/12/2010 5:29:09 PM DnsClient instance created
2/12/2010 5:29:09 PM Performing MX lookup for yahoo.com ...
2/12/2010 5:29:09 PM MX lookup complete, 8 MX records found
2/12/2010 5:29:09 PM Starting loop through MX records...
2/12/2010 5:29:09 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:29:09 PM Initiating connection with remote SMTP server 67.195.168.31 on worker thread...
2/12/2010 5:29:30 PM Checking to see if initial connection was successful...
2/12/2010 5:29:30 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:29:30 PM Loop through mail server IP addresses complete
2/12/2010 5:29:30 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:29:30 PM Initiating connection with remote SMTP server 74.6.136.65 on worker thread...
2/12/2010 5:29:51 PM Checking to see if initial connection was successful...
2/12/2010 5:29:51 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:29:51 PM Loop through mail server IP addresses complete
2/12/2010 5:29:51 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:29:51 PM Initiating connection with remote SMTP server 206.190.54.127 on worker thread...
2/12/2010 5:30:12 PM Checking to see if initial connection was successful...
2/12/2010 5:30:12 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:30:12 PM Loop through mail server IP addresses complete
2/12/2010 5:30:12 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:30:12 PM Initiating connection with remote SMTP server 209.191.88.254 on worker thread...
2/12/2010 5:30:33 PM Checking to see if initial connection was successful...
2/12/2010 5:30:33 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:30:33 PM Loop through mail server IP addresses complete
2/12/2010 5:30:33 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:30:33 PM Initiating connection with remote SMTP server 67.195.168.230 on worker thread...
2/12/2010 5:30:54 PM Checking to see if initial connection was successful...
2/12/2010 5:30:54 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:30:54 PM Loop through mail server IP addresses complete
2/12/2010 5:30:54 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:30:54 PM Initiating connection with remote SMTP server 98.137.54.237 on worker thread...
2/12/2010 5:31:15 PM Checking to see if initial connection was successful...
2/12/2010 5:31:15 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:31:15 PM Loop through mail server IP addresses complete
2/12/2010 5:31:15 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:31:15 PM Initiating connection with remote SMTP server 98.137.54.238 on worker thread...
2/12/2010 5:31:36 PM Checking to see if initial connection was successful...
2/12/2010 5:31:36 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:31:36 PM Loop through mail server IP addresses complete
2/12/2010 5:31:36 PM Starting loop through email server IP addresses in this record...
2/12/2010 5:31:36 PM Initiating connection with remote SMTP server 66.94.236.34 on worker thread...
2/12/2010 5:31:57 PM Checking to see if initial connection was successful...
2/12/2010 5:31:57 PM Initial connection failed, moving on to next mail server IP (if there is one)
2/12/2010 5:31:57 PM Loop through mail server IP addresses complete
2/12/2010 5:31:57 PM Loop through MX records complete
2/12/2010 5:31:57 PM Loop through recipients complete, returning result list to caller of SendEmail method
Obviously I edited out the email address, but that's the log. Looks like Yahoo rejected me.
-
Re: Would you use my .NET SMTP server class?
Ok, here we are. Infinite loop, there's a connection faliure to the only IP address so it loops back to it.
Code:
14/02/2010 7:52:20 AM SendEmail method called, performing property/argument validation...
14/02/2010 7:52:20 AM Property/argument validation complete
14/02/2010 7:52:20 AM Starting loop through recipients...
14/02/2010 7:52:20 AM Starting send for [email protected] ...
14/02/2010 7:52:20 AM Checking recipient domain name is valid...
14/02/2010 7:52:20 AM Recipient domain validation complete
14/02/2010 7:52:20 AM Creating DnsClient instance (DNS server 64.59.160.13) ...
14/02/2010 7:52:20 AM DnsClient instance created
14/02/2010 7:52:20 AM Performing MX lookup for gmail.com ...
14/02/2010 7:52:20 AM MX lookup complete, 5 MX records found
14/02/2010 7:52:20 AM Starting loop through MX records...
14/02/2010 7:52:20 AM Starting loop through email server IP addresses in this record...
14/02/2010 7:52:20 AM Initiating connection with remote SMTP server 209.85.222.31 on worker thread...
14/02/2010 7:52:41 AM Checking to see if initial connection was successful...
14/02/2010 7:52:41 AM Initial connection failed, moving on to next mail server IP (if there is one)
14/02/2010 7:52:41 AM Loop through mail server IP addresses complete
14/02/2010 7:52:41 AM Starting loop through email server IP addresses in this record...
14/02/2010 7:52:41 AM Initiating connection with remote SMTP server 209.85.211.45 on worker thread...
14/02/2010 7:53:02 AM Checking to see if initial connection was successful...
14/02/2010 7:53:02 AM Initial connection failed, moving on to next mail server IP (if there is one)
14/02/2010 7:53:02 AM Loop through mail server IP addresses complete
14/02/2010 7:53:02 AM Starting loop through email server IP addresses in this record...
14/02/2010 7:53:02 AM Initiating connection with remote SMTP server 209.85.221.31 on worker thread...
-
Re: Would you use my .NET SMTP server class?
Thats not an infinite loop - the first IP is 209.85.222.31 and the last IP (the one it gets stuck on) is 209.85.221.31
It looks like something is blocking your connection to any servers on port 25 - although this should not cause my code to hang, it should just fail to connect to each of them and then return... let me have another look at the code and i'll see if I can see why it would just stop there..
-
Re: Would you use my .NET SMTP server class?
Quote:
Originally Posted by
formlesstree4
Obviously I edited out the email address, but that's the log. Looks like Yahoo rejected me.
That looks more like the connection is being blocked not Yahoo rejecting you because of your IP address - if the SMTP server rejects you then it usually at least allows you to connect and then gives you an error in the SMTP session stating why you have been rejected. So it looks like either a firewall on your PC is blocking outbound connections on port 25 or your router or ISP is blocking it.
-
Re: Would you use my .NET SMTP server class?
I can mess with my router to see if opening port 25 does any difference.
-
Re: Would you use my .NET SMTP server class?
OK but usually routers are setup to allow all ports outbound, its just inbound that they usually block, so you shouldnt have to do anything... I guess its possible yours is blocking it outbound as well though. More likely to be a firewall or virus scanner on your PC though I would have thought (I know some versions of mcafee anti virus block port 25 to stop viruses sending mass spam mails from your PC).
Just do a quick test using telnet and see if you can telnet through on port 25 to any SMTP server that you KNOW accepts connections on port 25 and see what happens... e.g telnet smtp.live.com 25
-
Re: Would you use my .NET SMTP server class?
The connect failed.....what on earth does that mean? Is my ISP blocking me from doing it?
-
Re: Would you use my .NET SMTP server class?
Quote:
Originally Posted by
formlesstree4
The connect failed.....what on earth does that mean? Is my ISP blocking me from doing it?
Its possible, or like I said a firewall/av on your PC or possibly your router
-
Re: Would you use my .NET SMTP server class?
PC has no firewall on, but let me try my router.
Just tried it...gonna see if my ISP blocks any ports.
-
Re: Would you use my .NET SMTP server class?
Hey,
Who is your ISP? It might be worth asking the question to them directly.
Gary
-
Re: Would you use my .NET SMTP server class?
I host my own mail server at home. I have AT&T DSL and I had to explicitly ask for port 25 to be opened. It took a ten minute phone call when I started using them and it has been working fine ever since.
-
Re: Would you use my .NET SMTP server class?
So you gotta call them to get it open? I got the same ISP you do Negative.
-
Re: Would you use my .NET SMTP server class?
Yeah, you will have to give them a call.
Gary
-
Re: Would you use my .NET SMTP server class?
huh, our ISPs here in the UK must not be as bothered about stopping spam as I've never had to ask for any ports to be opened with any of my ISPs..
-
Re: Would you use my .NET SMTP server class?
maybe that's why most of the spamming bot people are found overseas? :p
-
Re: Would you use my .NET SMTP server class?
Wow, ths sounds really cool. I can't wait to see the finished product.
-
Re: Would you use my .NET SMTP server class?
Hey,
This most recent post has reminded me about this thread...
How's things going Chris?
Gary
-
Re: Would you use my .NET SMTP server class?
I havent done much with it recently to be honest as I've just had so much other stuff going on and it was taking up a lot of time. I did get it to successfully send some emails but I think some people on here encountered a few issues that I just never got chance to fully investigate. Might pick it back up soon but if anyone is really interested in the source code I guess I could make that available.
-
Re: Would you use my .NET SMTP server class?
I remember when you post somewhere long time ago that you started to work on that smtp server and that you'll probably fail doing so :) well, you prove yourself wrong, just wanted to say that this is really impressive
gj.
-
Re: Would you use my .NET SMTP server class?
Quote:
Originally Posted by
motil
I remember when you post somewhere long time ago that you started to work on that smtp server and that you'll probably fail doing so :) well, you prove yourself wrong, just wanted to say that this is really impressive
gj.
Thanks :) yeah I looked back over the code I've got so far yesterday and I'm quite happy that I've got as far as I have with it, as it seemed such a daunting task once I had started it and realised how much work was involved. I'll definitely have to try and spend some more time on it soon..
-
Re: Would you use my .NET SMTP server class?
How do you make a reference to your DLL?
Sorry for the noobish question :/
EDIT: doesn't matter, done it :)
-
Re: Would you use my .NET SMTP server class?
Just go to the Project menu and then go to Add Reference, then click the Browse tab and browse to the DLL :)
-
Re: Would you use my .NET SMTP server class?
Quote:
Originally Posted by
Emcrank
How do you make a reference to your DLL?
Sorry for the noobish question :/
EDIT: doesn't matter, done it :)
Don't worry about asking "noobish" questions. Everyone has to start somewhere, and no one on this forum should "flame" you for doing so.
Gary
-
Re: Would you use my .NET SMTP server class?
Quote:
Originally Posted by
Emcrank
EDIT: doesn't matter, done it :)
Cool :) did you try using the class and if so did it all work or did you have any problems?
-
Re: Would you use my .NET SMTP server class?
How do you acctually send an email. What email adress do you use?
I used the code you put at start
-
Re: Would you use my .NET SMTP server class?
How could I possibly tell you what email address to use? You use whatever email address you want to send to and whatever email address you want it to come from. As you will notice from one of my blog posts and some earlier posts in this thread though, you may have problems sending to hotmail/gmail/yahoo addresses if you are a home broadband user (rather than a business) due to restrictions that these email providers place on their servers to help stop spam.
-
Re: Would you use my .NET SMTP server class?
Noooo i meant, does the 'Sender' have to be one of my email addresses? or can i type anything in?
Also i was trying to send it to a gmail and hotmail so maybe thats why it wasn't reaching it in my inbox.
-
Re: Would you use my .NET SMTP server class?
Yeah you can specify anything you want as the sender address, though some spam filters do check to see if the IP address that you have matches the IP address that is registered as the mail handler/server for the email domain you are sending from.
As for sending to hotmail and gmail, unfortunately there is nothing I can do to fix that as its out of my control :( see here for a proper explanation of the problem if you are interested: http://cjwdev.wordpress.com/2010/01/...ress-report-4/
-
Re: Would you use my .NET SMTP server class?
As general point, spam email, and email spoofing, are big problems around the world, and not something that you should take part in!!! You should really only send email from domains/email address that you are in charge of, or own.
Gary
-
Re: Would you use my .NET SMTP server class?
Post #113: oh i guess its not much use then :(. O well.
Post #114: I wasn't sending it to anyone else. I was sending an email to myself when my program got opened