Sending mails with Net.Mail: no Email, No Error

hi,
i'm using the system.net.Mail namespace to send an email from my application. when i send, the application does not fire any exception, neither does it send the email to my account.
below is the code i'm using 
	Dim mmailMessage As New Net.Mail.MailMessage
        Dim mFrom As New Net.Mail.MailAddress(mailFrom)
        mmailMessage.From = mFrom
        Dim ll As String = "myname@ourmail.com"
        mmailMessage.To.Add(ll) 
        mmailMessage.Subject = "Talk Concerns"
        mmailMessage.Body = "Testing Concerns One Two"
        Dim sm As New Net.Mail.SmtpClient         
        sm.Host = "mail.ourMailserver.com"
        Dim myCred As New Net.NetworkCredential("myName", "***") 
        sm.UseDefaultCredentials = False
        sm.Credentials = myCred
        sm.Send(mmailMessage)
 note:
i used to send with the system.web namespace and it never put up such a behavior; in fact, i have an app in .net 1.1 that send mails to my inbox without a fuss.
please help
0
swapo
9/6/2006 5:45:19 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

1 Replies
675 Views

Similar Articles

[PageSpeed] 39

check the log of the SMTP server - probably authorization problems....

Hope That Helps
All that wander, are not lost...
What were we talkin bout
0
uncleb
9/6/2006 6:06:53 PM
Reply:

Similar Artilces:

Sending Email through System.Net.Mail is generating errors "Failure Sending mail
hi Sending Email through System.Web.Mail is working fine but System.Net.Mail is generating errors "Failure Sending mail  i treid in all possible ways but did't  pls help in giving a solution thanks & Regards vittal Maybe you can show us some code and post the exact error mesg as well (by looking at the value in ex.tostring)?My HomePage - www.findingsteve.net"It is more blessed to give than to receive." Acts 20: 35 (NIV, Bible)Progress - "Never discourage anyone...who continually makes progress, no matter how slow." Plato System.Web.Ma...

Sending Email with Net.Mail (No Email, no error)
hi,i'm using the system.net.Mail namespace to send an email from my application. when i send, the application does not fire any exception, neither does it send the email to my account.below is the code i'm using  Dim mmailMessage As New Net.Mail.MailMessage Dim mFrom As New Net.Mail.MailAddress(mailFrom) mmailMessage.From = mFrom Dim ll As String = "myname@ourmail.com" mmailMessage.To.Add(ll) mmailMessage.Subject = "Talk Concerns" mmailMessage.Body = "Testing Concerns One Two" Dim ...

Error handling sending mail (system.net.mail)
 Hi I did an aplication for send membership comunications and i want make a simple upgrade. I have a while for sent the messages to every recipients but i want in each recipient get if the mail has sent or failed, this is for sum that on a cell for the message but i dont know how get if the message go or failed?Im using VB. Somebody can help me on that?  You can't know for sure if the message was delivered or not. The only option would be to read any returned messages from the mail server. Website Design Darlington - http://mdssolutions.co.ukhttp://lesstha...

.net 2 beta 2 - System.Net.Mail
Hi guysI'm using the System.Net.Mail namespace in .net version 2, beta 2, to send out some HTML formatted e-mails.However, for some reason when the e-mail are sent out some of the full stops from the e-mail are removed.For example, part of the e-mail contains this code<img src="http://www.avonandsomerset.police.uk/images/grey_box_bottom.gif" alt="">But this is what the code is like when the e-mail source code is viewed<img src="http://www.avonandsomerset.police.uk/images/grey_box_bottomgif" alt="">Is this a known bug in beta 2? If so, where can I view a list of known bugs an...

Why do Sending SMTP Authenticated E-mail succeed using SmtpMail.Send() function but fail using SmtpClient.send() function ? Bugs in System.Net.Mail.SmtpClient when send a Authenticated E-mail?
I click btnOK button, the email can send OK, but click btnFail button,  the following error is displayed! why ? you can test the section code. The SMTP, username, password are valid!  Many thanks! "Syntax error, command unrecognized. The server response was: authentication failed,decode user password error" I have tested some other SMTP, somes is OK. I think there are some bugs with System.Net.Mail.SmtpClient when send a Authenticated E-mail with some SMTP!   //------------------------------------------.ASPX Code----------------------------------------...

System.Net.Mail.SmtpClient.Send() Error: An invalid character was found in the mail header
hi all!please help!I wanted to make an automatic email when I create user by CreateUserWizard. So I configured SMTP, then in properties of the wizard indicated textfile for message and wrote simple subject "registration" but I have an exception (like in subj).I even tried to set the subject in event handler for "emailsending" event. Same exception.  What is wrong? How could I fix it?  Here us some info from stack:[FormatException:An invalid character was found in the mail header.] System.Net.BufferBuilder.Append(String value, Int32 offset, Int...

About: how can i send a MIME(Text und Html Format) Mail by System.Net.Mail und .Net 2.0
Helle to all, I hope that someone can help me. I need to implement a programm to send newsletters. The newsletter Format can be Html, Text and MIME(Html and Text). when using CDONTS library man can set MailFormat = MIME. But i use System.Net.Mail and there are only text or html Format. Can someone tell me how can i use System.Net.Mail to send a MIME Mail? Thanks Best Regards Pinsha perhaps this link can help:  http://systemnetmail.com/faq/3.1.3.aspxIn this world there are 10 types of people, those that know binary and those who don't....

System.Net.Mail.SmtpClient.Send() Error: An invalid character was found in the mail header #2
Hello  I get This error when trying to send mailMessage. The problem wasn't there until today. Until today I developed my webside on Windows XP machine, Today I moved it to a new machine of Windows Vista Ultimate and the same Code on vista produce an error (same as you mentioned) Need Help.   Thanks, Hi,What character set are you using? Try setting the encoding to Encoding.UTF8;   Narmatha Balasundaramhttp://reflexangle.blogspot.com I tried to set the subject and body encoding to UTF8 with no luck.  The thing is that the code works fine on Windows ...

system.net.mail not sending out mail
I recently upgraded from a 2.0 framework to 3.5 using c#.  When I upgraded, I needed to change the way I was using MailMessage.  But now for some reason it doesn't work.  Am I missing something?Below is my code:using System.net.Mail; MailMessage msg = new MailMessage();msg.To.Add(toList);msg.CC.Add(ccList = null ? "" : ccList);msg.From = new MailAddress(fromList);msg.Subject = subject;msg.Body = body;msg.IsBodyHTML = true; SmtpClient smtp = new SmtpClient(smtpServer);smtp.Send(msg); I'm passing all the value from my web.config file inside AppSettings.What ...

System.Net.Mail is giving error CS0029: Cannot implicitly convert type 'string' to 'System.Net.Mail.MailAddress'
I'm getting an error while trying to use the wizard to create a form and than pass it the vaibles to Mail. Any help would be much appreciated. SmtpClient smtpClient = new SmtpClient(); MailMessage message = new MailMessage(); try {   message.From = txtEmail.Text; message.To.Add("admin1@yoursite.com"); message.Subject = "Feedback"; message.CC.Add("admin1@yoursite.com"); message.CC.Add("admin2@yoursite.com"); message.IsBodyHtml = false; message.Body = txtMessage.Text; smtpClient.Send(message); lblStatus.Text = "Email successfully sent."; } catch (Exception ex) { lbl...

I am not getting my mail open on my net as net is running
Name: Email: rmbala91atgmaildotcom Product: Firefox Summary: I am not getting my mail open on my net as net is running Comments: My mail is not getting opening. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

get mail using System.Net.Mail
How can i get Email usign System.Net.Mail ?? Hello poloxy  ,the System.Net.Mail used only for sending emails and not to receive them.Read the full documentation at  MSDN Library http://technet.microsoft.com/en-us/library/system.net.mail.aspx  Hosam Kamel Remember to click on Mark as answer on the post that helped you SO how can I receive mail ? Try one of these pop3 librarieshttp://www.codeproject.com/info/search.aspx?artkw=pop3  Hosam Kamel Remember to click on Mark as answer on the post that helped you HI,   if you want to send email by using System....

Email switch from Web.Mail to Net.Mail
Hi all, I have currently switched using the .Net 2 Net.Mail At the moment the SMTP Server is located at the same server as the web server. So if I do not specify the IP address for the SMTP then it will use the local machine, the following works: try {System.Web.Mail.MailMessage msgMail = new System.Web.Mail.MailMessage();    msgMail.To = txtTo.Text; msgMail.From = txtFrom.Text;if(!string.IsNullOrEmpty(txtCC.Text)) msgMail.Cc = txtCC.Text; msgMail.Subject = txtSubject.Text;msgMail.BodyFormat = System.Web.Mail.MailFormat.Text; msgMail.Body = txtBody.Text;System.Web.Mai...

Sending an Email with system.net.mail -- problem with strings and body of the email.
Hi,I am trying to email the contents of a contact form such that the email body looks like this:Last name: Smith First name: John Comment: Test comment. I am using the MailMessage object.I am storing the textbox values in strings://assign values from form to variables   string first = textboxFirst.Text;   string last = textboxLast.Text;   string comment = textboxComment.Text;and then combining the strings into one string for my MaiMessage.Body property.  //create message body from textbox variables     string message = "Last Name: "  + l...