.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

SMTP mail goes to JUNK folder?

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net


I am sending mails thru SMTP server. If i use HTML body, then email is going to JUNK folder. If plain Text, then email going to Inbox. But I need to use HTML in body, without going email to JUNK. Any ideas?

I am sending this email from valid email address. i.e noreply@abc.com. abc is our company name. All other emails, which I get from this email address goes to Inbox only. But when i try to send mail it is going to JUNK, if body is HTML.

How ot deal with this?

View Complete Post

More Related Resource Links

sharepoint smtp mail drop folder


i am planning to send my report to the smtp mail drop folder using ssrs window file share delivery and then can the Sharepoint timer service pick up this report and put it into its doc lib....

i am trying these strange ways because i cannot do any exchange server settings for sharepoint incoming mail and also i cannot use sharepoint Reporting service integration as then i will not be able to see SSRS reports through Report serve

ANy help??


I cannot send mail using gmail smtp server


 Here is my code

Dim message As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
        message.To.Add("from textbox field")
        message.Subject = "Testing"
        message.From = New System.Net.Mail.MailAddress("sender email ")
        message.Body = "Just Testing"

        Dim smtp As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()

        Dim client As SmtpClient = New SmtpClient()
        smtp.Credentials = New System.Net.NetworkCredential("username", "password")
        smtp.Port = 25
        smtp.Host = "smtp.gmail.com"
        smtp.EnableSsl = True
        smtp.DeliveryMethod = SmtpDeliveryMethod.Network
        lblmsg.Text = "Your Email has send"


SMTP Service not found in services folder


I am having a bit of a challenge.  I have Sharepoint 2010 and picked SMTP in the roles option.  Then I installed IIS 6.0 manager.  It installed correctly.  I was then going through and creating the SMTP instructions that I found on technet.  The bottom line is when I goto services to make sure it was turned on automatically (as technet directed me to do) I could not find the SMTP service.


Does anyone know why this is?  I had uninstalled reinstalled SMTP but it still does not show up.


Glen Harouff

Mentor Public Schools

sening mail using asp.net smtp server


Hi i am using  code for sending email

i have uploaded my code to web server. It gives me error

(No connection could be made because the target machine actively refused it XX.XXX.XXX.XXX:XXXX )

 i am using this code for smtp configure http://www.codeproject.com/KB/vb/Email_and_SMS_.aspx?msg=3265289


Write a mail : problem in SMTP server ?


Hai to all,

I want to sent and receive a mail to any maild id(based on user mind), now every time I need to give smtp server name of the sender mail in my code, but lot of smtp servers

available for different mail providers (we never assume what the mail user will give in to sender area), i have  a separate server with smtp and pop3 enabled,  I don't know how

to use this server for mail purpose.

If i use this server then will my problem is solved then how to use that server or any other solution ?


Members have any idea ?


smtp mail error


hi all, 

i am trying to send a dynamic email through smtp in the code behind of one of my pages. when i try to run the app i get the follwing error

"The message could not be sent to the SMTP server. The transport error code was 0x800ccc69. The server response was 550 Invalid recipient: XXXXXX@hotmail.com

also i am using an smtp server on my local machine so when i turn it on i get the above error, when i turn it off and run it i get the following error:

"The transport failed to connect to the server."

Does anyone have any idea how to fix this? here is my code behind

Imports System.Web.Mail
Imports System.IO

Partial Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim result As String = ""
            Dim sr As StreamReader = New StreamReader("MyContent.htm")
            sr = File.OpenText("MyContent.htm")
            result = sr.ReadToEnd()
        Catch ex As Exception
        End Try

        Dim MessageBody As String = result.Replace("<YourFriendName>", txtFriendName.Text)

How to configure Gmail SMTP server to send mail



I'm using forgot password wizard and I configure my smtp like this:

and the SMTP server:

smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587

   <smtp from="myemail@gmail.com">
    <network host="smtp.gmail.com" password="pass" port="587"
     userName=myemail@gmail.com />

 but, the error:

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. 23sm5887003pzk.8

Please gives me some advices,

Thank you.

2010 E-Mail Alerts with External SMTP Mail Server


I'm using SharePoint Server 2010 internally for testing purposes/development purposes.  I don't have Exchange Server or any other SMTP mail server setup.

I have a hosted SMTP mail server.

Can I connect SharePoint Server 2010 to an externally hosted SMTP mail server for e-mail notification testing?

In this case, my hosted SMTP server requires authentication... so I'm not sure SharePoint Server 2010 will be able to connect.

Any ideas?



Send smtp mail from asp.net 3.5


Hi, i m new to this forum and to asp.net

I m trying to send email from my asp.net page using smtpclient. I m getting an error saying "Error creating object reference:could not create instance of an object.".  When i debug, it throws the error at smtpclient.send method.

Here is my code:



MailAddress toAddress = new MailAddress("maran@makefriendsonline.com");

MailAddress fromAddress = new MailAddress(txtEmail.Text.Trim());

MailMessage msg = new MailMessage();


msg.From = fromAddress;

msg.Subject = "New Customer Enquiry";

 msg.IsBodyHtml = true;

string msgBody = txtMessage.Text.ToString();

msg.Body = msgBody;

SmtpClient smtp = new SmtpClient("localhost");



catch (Exception ex)


lblStatus.Text = ex.Message;



My web.config settings are





How to intercept mail messages before reaching a SMTP server


I need an application that will intercept all incoming mail messages and modify them according to some specs. I am an absolute rookie at this, please detail :)

a)     I need to either hook into it's SMTP events, and modify the message before it is passed on to the local intended user.


b)    A SMTP proxy service, that sits in front of your real SMTP server. Inside of the SMTP proxy,

Mail Merge




I am after creating a mail merge documents from datasource and .dot template file on server side. Can you give me an idea how i will achive this?


Thanks in advance.



Syed Hussain



SMTP not working if I use web deployment package to deploy my app.


Hi all

I use msdeploy to install my web app. deployment package. everything about web app works, but find out email was not working.

I checked telnet smtp is running.

I debug the project, and it was sending out email too.

So my solution was upload the whole project (not complied) to wwwroot, and email works too. Thats why I assume the deployment cause the problem.

at last, I also tried to copy the web deployment web.config to replace the project's web.config, and the email also work, so it wasn't the web.config problem.

Could anyone tell me whats going on?

My environment:

window 2003

iis 6

.net framework 4.0

Email Help (System.Net.Mail)


Hi I have a annoying problem. 
I have created a page which takes users details for a quote.

I have then created the form to be emailed to both the user and myself. (Which works fine ATM)

However I would also like to be able to attach a file containing terms and conditions to the email.

I have tried doing this using 

EmailMsg.Attachments.Add(new Attachment("C:\\attachme.txt"));

But everytime that line of code is hit it fails and is caught by my try catch.

Take that line out and the email sends fine, put it in and it breaks the whole page.

Am I missing something really obvious?

Toolbox: Create Graphs, Send E-Mail, Spell-Check, and More


Turn boring data into stunning graphs, create, parse, send, and receive mail messages from code, and more.

Scott Mitchell

MSDN Magazine August 2007

BizTalk Adapters: Integrate E-Mail Processing Into Your Business Solutions


Use BizTalk Server to monitor e-mail for new messages, trigger confirmations, and persist e-mail and attachments to a custom database.

Alex Starykh

MSDN Magazine December 2006

Toolbox: Automated Build Process, Real-World E-Mail Tasks, and More


While the Visual Studio® Build menu's Build Solution option is the usual way developers compile their current work on a project, the process of building the complete solution for testing, deployment, or production often requires many more steps.

Scott Mitchell

MSDN Magazine March 2006

Editor's Note: Reader E-mail


Here at MSDN Magazine, we get a lot of mail from readers. As you can imagine, much of it involves fulsome praise for our content, our eye-catching covers, or the handsome photo that now graces this page.

Joshua Trupin

MSDN Magazine June 2005

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend