Questions tagged [mailmessage]

The MailMessage class can be considered the foundation class of the System.Net.Mail namespace.

The MailMessage class can be considered the foundation class of the System.Net.Mail namespace.

Instances of the MailMessage class are used to construct e-mail messages that are transmitted to an SMTP server for delivery using the SmtpClient class.

The sender, recipient, subject, and body of an e-mail message may be specified as parameters when a MailMessage is used to initialize a MailMessage object. These parameters may also be set or accessed using properties on the MailMessage object.

The MailMessage class also allows an application to access the headers collection for the message using the Headers property. While this collection is read-only (a new collection can not be set), custom headers can be added to or deleted from this collection.

344 questions
0
votes
2 answers

Passing parameters via email

Many applications use emails for accounts verification and other different purposes.You can see that those emails contain Buttons that redirect you to a certain page with a url parameters(ex:http://users/1234....). How can I do the same…
Sleiman Jneidi
  • 22,907
  • 14
  • 56
  • 77
-1
votes
1 answer

.NET MailMessage DeliveryNotificationOptions stop working when adding a CC

I recently added a CC to a .NET MailMessage. As soon as I did that the read return receipts stopped working. The read receipts are quite handy as they not only show who has read the message (provided the client supports it) but also the 'Deleted…
gchq
  • 1,603
  • 2
  • 27
  • 52
-1
votes
2 answers

Suddenly getting the error Failure Sending Mail in ASP.Net

I am continuously getting this error failure sending mail. I have already tried by changing port 465/25/587 but nothing worked. My credentials are also correct. All these configurations are for outlook. Checked all the ports they are also not…
-1
votes
1 answer

MailMessage only accepts sender with @domain

I wrote a code in .NET to send emails in my application: Oxygenne + ASP.Net: mensagem:=MailMessage.Create(configemail[1],toUsers); mensagem.Subject:=title; mensagem.Body:=body; mensagem.IsBodyHtml:=IsBodyHtml; This works fine when …
Arturio
  • 418
  • 1
  • 7
  • 25
-1
votes
1 answer

C# MailMessage string format

I'm trying to get strings to line up in an email. Everything looks fine when I set the Body of the MailMessage but things aren't lined up when I get the email. MailMessage email = new MailMessage(); //...setup from/to/host/port etc …
user441521
  • 6,942
  • 23
  • 88
  • 160
-1
votes
1 answer

PowerShell send-mailmessage

How do I terminate cmdlet prompts for To[] address? It keeps asking for more! this is what I see: send-mailmessage cmdlet Send-MailMessage at command pipeline position 1 Supply values for the following parameters: From: ABCD@boo.edu Subject:…
shlasasha
  • 165
  • 1
  • 14
-1
votes
1 answer

Want to get the textbox value and create a link from it

I am working on a Work Order Management system, where a user creates a work order, hits the insert button, and after validating the fields I am sending an email. In the body of the email I would like for the value from a textbox to be clickable via…
ExpertWannaBe
  • 117
  • 3
  • 17
-1
votes
1 answer

From and reply-to field messed up when containing both comma and unicode characters

In .net I am having problems with the From and Reply-to field when their values contain both commas and utf-8 chars. Let me explain better: I use this: Dim Mail As New MailMessage ..... Mail.From = New MailAddress(MailAddressFrom, mailFromName,…
Muleskinner
  • 14,150
  • 19
  • 58
  • 79
-2
votes
3 answers

Configure forward-to property for MailMessage like replyto in C#

Is there any way to configure forward-to email address like replyto in System.Net.Mail.MailMessage? If not then is there any way I can achieve that?
Akshay Naik
  • 669
  • 1
  • 6
  • 22
-2
votes
2 answers

MailMessage throws a Configuration Exception

I don't understand what needs to be added to the config file or anywhere else. The tutorials don't show anything else and I can't find an answer. Please help. I removed all other code and just left this part since this was the problem. Here is the…
-2
votes
1 answer

How to save MailMessage with multiple attachment into Sql Server database

I have a requirement where i need to save complete mailmessage object into database. Using below code i am able to save message body and single attachment into database but i can have n number of attachment in my email so how to handle such…
manish kumar
  • 85
  • 1
  • 9
-2
votes
1 answer

I seem to be getting a positional parameter error with mailmessage in powershell at 144

Below is the code to an internal tool I was put in charge of setting up. It basically references a spreadsheet based on a known value and uses some of that information for sorting purposes and uses other information to populate the automated email.…
-2
votes
1 answer

MailMessage smtpClient not working after release

The following code is working fine when debugging with localhost but not after I release to the web-server. protected void SendMail() { MailMessage mailMessage = new MailMessage(); mailMessage.From = new…
Deeyo
  • 27
  • 3
  • 9
-3
votes
1 answer

How can I add an attachment to a MailMessage?

I've got this code that sends a simple email using SmtpClient, MailMessage, and MailAddress objects: private void EmailMessage(string msg) { string TO_EMAIL = "cshannon@proactusa.com"; var windowsIdentity =…
1 2 3
22
23