Questions tagged [system.net.mail]

System.Net.Mail is a namespace of the .NET framework. It contains classes used to send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery.

System.Net.Mail is a namespace of the .NET framework. It contains classes used to send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery.

References

290 questions
0
votes
0 answers

System.Net.Mail.SmtpClient authentication not working

I've got a C# WPF application that is supposed to send email to an internal email group in certain situations. It works in some cases, but some of the distribution groups seem to be set up in a way that requires authentication, and the Exchange…
fussmonkey
  • 606
  • 5
  • 19
0
votes
1 answer

How do I set the sensitivity on an email in c#?

Is there a way to set the sensitivity on an email in c#? I tried using mail.Headers.Add("Sensitivity", "Confidential"); but nothing shows up on the email.
Chris
  • 5
  • 1
  • 3
0
votes
1 answer

Are SMTP relay requirements for System.Net.Mail different than System.Web.Mail

I deployed my web app to our production IIS 6.0 server and everything is working except when my code attempts to send email to an address that is NOT in the domain of our email server. I've seen various symptoms but this seems the most…
John Adams
  • 4,773
  • 25
  • 91
  • 131
0
votes
1 answer

E-Mail sending with Send-MailMessage works, but not with SmtpClient

The following Powershell script works on my Windows Server 2012: send-mailmessage -from "from@domain.com" -to "to@domain.com" -Subject "test" -Body "test body" -smtpserver myhostip -credential "mydomain\myuser" When I execute it, a window appears…
Jonas Sourlier
  • 13,684
  • 16
  • 77
  • 148
0
votes
1 answer

Unable to send mail from VB form using system.net.mail

Our company has a call centre which pc's are locked down (no access to internet, email, office applications) and there is a need for them to be able to log support tickets from their own machines. I have created a VB Windows forms application which…
Stroes
  • 351
  • 2
  • 5
  • 23
0
votes
0 answers

VB.NET Sending email with CDO

I am trying to use the new .NET methods of sending email (System.Net.Mail), but I have various troubles along the way. My VB.NET app allows users to gather info and email it out based on the smtp server specs they set. Current issues are sending…
Brian
  • 69
  • 1
  • 3
0
votes
0 answers

Send email using smtp

I am trying to send email outside our domain network. I have done this for months within my company domain without any problem. Now I am trying to create customer email process. the code is simple using system.net.mail string Recipient =…
0
votes
2 answers

Sending an email via contact form with System.Net.Mail Asp.Net MVC C#

In my code below I am trying to create a contact form that has the fields first name, last name, email, comment. When the submit button is pressed I need it to send an email to my Gmail address. I've looked at many guides, forums, tips from all…
DevTec
  • 31
  • 2
  • 6
0
votes
0 answers

exception while sending mail multiple recipient

I am trying to send an email to Multiple email addresses. But I am getting this exception A recipient must be specified at this line smtp.Send(mail); I have checked related posts on stackoverflow then I have tried to add this line …
user3733078
  • 249
  • 2
  • 11
0
votes
1 answer

Exception thrown while trying to send mail through gmail SMTP

The below exception is thrown while trying to send mail by below code: SMPT server requires a secure connection or the client was not authenticated. The server response was 5.5.1. Authentication required C# string E_mail_ID = "hidden"; try …
Jagmeet
  • 11
  • 3
0
votes
0 answers

From Email Name in ASP.NET

I am trying to send email from X@gmail.com to Y@yahoo.com using System.Net.Mail, Below is my code Dim message As MailMessage = New MailMessage() message.From = New MailAddress(Me.txtFromEmail.Text, Me.txtFromName.Text) message.Sender = New…
Kartik Goyal
  • 376
  • 1
  • 6
  • 15
0
votes
2 answers

Performance problem with System.Net.Mail

I have this unusual problem with mailing from my app. At first it wasn't working (getting unable to relay error crap) anyways I added the proper authentication and it works. My problem now is, if I try to send around 300 emails (each with a 500k…
Saif Khan
  • 18,402
  • 29
  • 102
  • 147
0
votes
0 answers

MVC system.net.mail

Hi I am having difficulties sending email to registered users.I get exception error in the line: msg.To.Add(new MailAddress(newsletter.AspNetUser.Email)); Error: An exception of type 'System.NullReferenceException' occurred in MVCHarmony.dll but was…
0
votes
1 answer

Converting System.Web.Mail to System.Net.Mail

I need some help converting System.Web.Mail to System.Net.Mail to help send out e-mail notifications appropriately on some forms. The old code snippet used is below: MailMessage NotificationEmail = new MailMessage(); NotificationEmail.BodyFormat =…
Ogreintel
  • 1,143
  • 2
  • 11
  • 15
0
votes
1 answer

send a textbox value to gmail account

i want to send an e-mail to my gmail account consisting of the value in a textbox. the code below is what i'm trying to do but it's not working could you please tell me what could be my problem ? when i run the program becomes not responding than it…
user3679986
  • 53
  • 1
  • 10