Click here to Skip to main content
15,887,477 members
Everything / Mail

Mail

mail

Great Reads

by Shuqian Ying
The source code and a simple demo program for a plug-in in Microsoft Managed Extensibility Framework (MEF) that provides visual display of email messages.
by cogi83
A SW to send your WAN IP and other info via email
by Jason Sultana
Common practice that I employ in test projects - re-usable mocks
by Tibor Blazko
Sending and receiving emails in cloud Functions

Latest Articles

by Jason Sultana
Common practice that I employ in test projects - re-usable mocks
by Tibor Blazko
Sending and receiving emails in cloud Functions
by Bipin Paul
Implementation of Contact Us Page using ASP.NET MVC pattern
by cogi83
A SW to send your WAN IP and other info via email

All Articles

Sort by Title

Mail 

31 Jul 2012 by Shuqian Ying
The source code and a simple demo program for a plug-in in Microsoft Managed Extensibility Framework (MEF) that provides visual display of email messages.
7 Jun 2020 by Haifovchanin
I am writing an application that processes user emails. On start the application connects to Gmail and then once per minute checks for new emails. After approximately 12 - 20 hours the application stops processing new emails. Using logs I found,...
7 Jun 2020 by Richard Deeming
As discussed in the comments, it's better to open the connection, process the new messages, and close the connection each time, rather than trying to keep a single connection open for many hours.
19 Mar 2015 by kinahp
Currently had only name,email,subject and message but really want to add phone number help please // Email Submit// Note: filter_var() requires PHP >= 5.2.0if ( isset($_POST['email']) && isset($_POST['name']) && isset($_POST['subject']) && isset($_POST['message']) &&...
19 Mar 2015 by ramyajaya
HI please make the below mentioned changes in your code. $MESSAGE_BODY .= "Contact No: ".$_POST["phonenumber"]."\n"; $MESSAGE_BODY .= "Message: ".$_POST["message"])."\n";mail( "youremail@email.com", $_POST['subject'], $MESSAGE_BODY, "From:" ....
26 Jan 2014 by Member 10446575
Now i wrote below coding after u said.-----------------------------------------------MailMessage Emailmsg = new MailMessage(); Emailmsg.From = new MailAddress("jothi.mscit87@gmail.com", "plain name"); Emailmsg.To.Add (new...
24 Jan 2014 by Mehdi Gholam
If you are sending your email via Yahoo.com then you should use their address and settings not "localhost":http://email.about.com/od/accessingyahoomail/f/Yahoo_Mail_SMTP_Settings.htm[^]SmtpClient MailClient = new SmtpClient("smtp.mail.yahoo.in",465);MailClient.Credentials = new...
26 Jan 2014 by Sujee1
SmtpClient client = new SmtpClient("smtp.gmail.com", 587); client.DeliveryMethod = SmtpDeliveryMethod.Network; client.EnableSsl = true; System.Net.NetworkCredential credentials = new System.Net.NetworkCredential("EmailID@gmail.com", "Password"); ...
27 Oct 2014 by KaushalJB
Hi All,I used below code for opening Client Email through hyperlink, but if I add Attachment to this it would not work as I have googled and found out that Attachment does not work here. I need alternative to this for opening Client Email plus adding attachment to it. Please help...
27 Oct 2014 by kedar001
this might help you..Mail with Attachment[^]Programmatically adding attachments to emails[^]
27 Oct 2014 by Kornfeld Eliyahu Peter
mailto:// is the only protocol that enables opening the client's local mail application...All the other approaches will need some additional code (plugin)...To be precise the mailto:// protocol does not support attachments... (https://www.ietf.org/rfc/rfc2368.txt[^]), even some browsers do...
27 Aug 2015 by Member 11463947
hi i am creating the website with code of sending mail, in this website the mail will send from my localhost and after publish code on my system iis server, but if i will place this site on cpanel( hosting on web) then the mail not send on mail id mention in code...and executing following...
26 Feb 2013 by rahulkasar
Hi,I am using the following code to send mail with attachment . The function below works fine sends mail but does not attach the attachments to it Please help me in this : Dim msg As New System.Web.Mail.MailMessage If BodyFormat = "HTML" Then msg.BodyFormat...
27 Feb 2013 by Hemant Singh Rautela
Email Attachment Code in C#public bool sendemail(string to, string replyto, string body, string subject, FileUpload f1, FileUpload f2) { MailMessage mail = new MailMessage(); mail.To.Add(to); mail.From = new MailAddress("xyz@gmail.com","Subject of Email"); ...
27 Feb 2013 by BheemG
How to Send Mails from your GMAIL Account through VB.NET or C#. Windows Programming, with a Bit of Customization[^]
27 Feb 2013 by Anuja Pawar Indore
Refer this article on CPSend mail using System.Web.Mail namespace[^]
7 Sep 2013 by NarenDx
Design Page: Message to: Message from: ...
27 Feb 2013 by rahulkasar
Hi,I am using System.Web.Mail.MailMessage object and not System.Net.Mail object. Also in the code msg.Attachments.Add((New MailAttachment(Attachment))) I am passing Attachment as a path from physical location e.g :- msg.Attachments.Add((New MailAttachment("C:\\Temp\Test.ics"))) ...
7 Sep 2013 by Member 8650519
Use this Code for senting Email through Web mailStep -1:Add this following Code in your C# file.{ string mailUsername = ConfigurationSettings.AppSettings["MailUserName"].Trim(); string mailPassword =...
9 Sep 2013 by Kunal_Patel
http://www.c-sharpcorner.com/u...
13 Sep 2013 by basurajkumbhar
sending mailprivate void btnsendmail_Click(System.Object sender, System.EventArgs e){ MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress(txtid.Text); mail.To.Add("Email Id To Send...
19 Jan 2018 by Samira Radwan
Hi All, I'm trying to send an email using SQL dbmail which works very well for me. When trying to attach file from fileUpload control in aspx page it gives an error as the file is invalid. Please advise what should be done to send uploaded file as attachment using dbmail. I know using...
19 Jan 2018 by ZurdoDev
Refer to the documentation, sp_send_dbmail (Transact-SQL) | Microsoft Docs[^]. It reads: Quote: [ @file_attachments= ] 'file_attachments' Is a semicolon-delimited list of file names to attach to the e-mail message. Files in the list must be specified as absolute paths. The attachments list is...
24 Aug 2019 by Yunus Bulduk
Hey How do I send comfirm mail together html page ? I use Identity smtp mail sender . But I can't send to mail with my html template page. Thanks for help This code : What I have tried: public async Task Register(RegisterViewModel model) { if...
24 Aug 2019 by Afzaal Ahmad Zeeshan
First of all, you are using IdentityMessage, instead of a MailMessage. IdentityMessage Class (Microsoft.AspNet.Identity) | Microsoft Docs[^] MailMessage Class (System.Net.Mail) | Microsoft Docs[^] There was option with MailMessage to send HTML content, and have it processed and delivered with...
29 Sep 2014 by Arunprasath Natarajan
Dear Friends,I have created a content in the webpage and generating that content in mail to few users.Now i need to push that mail ramdomly weekly once and at any time.
29 Sep 2014 by CPallini
That's should be simple: for each user generate randomly the timestamp at which the push event should happen. Then your program periodically could check if the timestamp is elapsed AND the email has not yet been sent. If both conditions are met then it could send the email (and mark it as 'sent').
30 Oct 2018 by Ravi Sargam
I have a class where i pass mailmessage object with json serialser like JsonConvert.SerializeObject(mailmessage); The problem is if i add attachment to mail object i am getting error at JsonConvert else it is working fine, can anyone help me how to convert mail object with attachment into...
30 Oct 2018 by Ram R
Since you say capactiy error while posting to azure queue. If you are using Queue Storage, then the maximum limit on a message is 64KB unless you enable Blob Storage.
24 Jan 2013 by niko_tells
hi guys,i have a datagridview with a databinding. Now i have a Funktion to send mails.when the mailform opens, im copying each cell.value into a list of strings.to Format the strings right into my richtextbox (mailform), i insert "Tabs" \t.Now the mail Looks good in my form, but if i...
24 Jan 2013 by Anurag Sinha V
Hi..Can you post some code as to what you have done?I would suggest to have a CSS class in your form which should apply to the values, such as padding, border, color and stuffs...-Regards
13 Nov 2017 by Kaj Lao
Can you send mail from your mail to someone else using HTML? What I have tried: Research, but I can't find what I'm looking for.
13 Nov 2017 by Afzaal Ahmad Zeeshan
You did not find anything, because you cannot send an email with HTML, HTML is merely a markup language and has nothing to do with any sort of processing. You can use any server-side programming framework to send an email, or even a language such as C++/C# or Java. This topic has been covered...
20 Oct 2016 by Makarand Borawake
Hi,I am send bulk of mails(more than 50) to user using Database mail in sql server 2012. But got following error:Error,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 Exception Message: Cannot send mails to mail server. (The...
24 Apr 2013 by Sriram Mani
Hi,Recently I came across a glitch to which i couldnt find a solution. I have a mailto: link in a French language page. I'm using the mailto: subject as a french text. When I'm using the mailto: link from Firefox, it is rendering correctly in Outlook 2003. But when i try the same from...
24 Jul 2012 by rupeshsha8452
Can any one help me. Regarding to email verifier. I want to check mail id existence on mail server through c#. I am not getting proper solution regrading to same. So Please help me ASAP.
24 Jul 2012 by Prasad_Kulkarni
Refer:MailSy...
24 Jul 2012 by rupeshsha8452
I had try all these things but not getting success.
23 Jul 2014 by Charlesirwin1810
I need to configure my database mail, in SQL Server 2005, i was able to send mail using GMAIL, but i need to configure using my exchange server settingshow can i find the smtp server, port,authentication details from Exchange server and config DBMail in SQL Server
20 May 2015 by Jamil Isayyed
Hello Folks,I am trying to convert all internal mails (TNEF format) in exchange server to plain text.i successfully converted the body, but i couldn't convert or change the body format in the TNEF message to plain text which is different than the External mails where we use the headers...
3 Oct 2016 by Codes DeCodes
I am using global.asax to send mail at regular interval. The time to send mail is set in db and can be any time in 24 hours(like 1 am, 1 pm, 6 am and so on). This is my code :void Application_Start(object sender, EventArgs e) { System.Threading.Timer _timer = new...
3 Oct 2016 by Dave Kreskowiak
First, using a Timer is not really a good idea. It binds all the email sending code to your site being up and running. Also, it doesn't scale across servers. You'll have more than one server running the email check at different times. That's not the job of your web server.It's POSSIBLE to...
14 Jan 2016 by Dave Kreskowiak
Ask this in the Bugs and Suggestions - CodeProject[^] forum, not in QA.
18 Mar 2014 by mike bert
I try to open a AES encrypted Email. I tried it using EAGetMail and Chilkat but it doesnt work.Do I Need a certificate or private/public key?Mail oMail = oClient.GetMail(info);Certificate oCert = new Certificate();oCert.Load("E:\\Programme\\Email_Verarbeitung\\tt.cer");try{ ...
30 Jan 2015 by Michael Haephrati
How can one check if there is a default mail client (i.e. Outlook) or there isn't such.Usually if you type "mailto://someone@domain.com, it will open this default client, or if there isn't such, a message will appear. What I am trying to find out is how can this information be found...
30 Jan 2015 by Jochen Arndt
See the MSDN article How to Register an Internet Browser or Email Client With the Windows Start Menu[^].It describes how to set the default programs using the registry. Read the mentioned keys to determine the default program.
20 Mar 2018 by dnibbo
Hi All Using Outlook.MailItem you can set a DeferredDeliveryTime to send at a certain date/time in the future. Does anyone know how to do this using Net.Mail.Mailmessage? I am hoping it can be done using the MailMessage.Headers but cant find any documentation on it anywhere. Thanks What I...
20 Mar 2018 by Jochen Arndt
According to PidTagDeferredDeliveryTime Canonical Property[^]: MAPI does not perform the deferred delivery; it is an option of the underlying messaging system to handle deferred delivery. you would have to find out which "messaging system" is used by Outlook and if that is also used by Net.Mail....
15 Apr 2021 by narendra_patil
Hello All, I am sending mails through SQL SendMail Jobs relayed through SMTP server. Recipients are in "To" as well as "CC". However, the SQL server is capturing the status as "Sent" for the invalid domain names as well. 1. If the domain names...
15 Apr 2021 by Richard Deeming
For invalid domains, you would only get a delivery failure if SQL Server was sending email directly. Since it's configured to send via your SMTP server, all it can know is that your SMTP server has accepted the message for delivery. At some later...
1 Apr 2022 by Member 11677920
For 10 years I've used same code - very similar to that which follows. All of a sudden I'm getting an error: "Mailbox Unavailable 5.5.1 Authentication required". Using VB.net, my code: Imports System Imports System.IO Imports System.Net.Mail ...
7 May 2016 by dravoss
0down votefavoritei use phpmailer , but i have a problem with the addCustomHeader function it always give a bounce .this is the code that i used in :$headers = rtrim($_POST['customHeader']);$PHPMailer->addCustomHeader($headers);and this is the header that i used in the my...
7 May 2016 by Garth J Lancaster
what does $headers contain here ?Quote:$headers = rtrim($_POST['customHeader']);I would have thought the usage of addCustomHeader was (as per the documentation PHPMailer[^])$PHPMailer->addCustomHeader($headers, value);you dont look like you're supplying a value - also see here...
18 Jul 2013 by Jay M1
I am creating a mail application which sends Email contains 1 Image(size-500KB). The mail is always going in spam folder and it always ask to 'Display Image Below'. I am also inserting all the necessary Headers which is:$headers = "MIME-Version: 1.0" . "\r\n";$headers .=...
19 Jul 2013 by Sergey Alexandrovich Kryukov
It has nothing to do with your application. A receiver of your mail has a spam filter which is tuned this way. If this is yours, fix the filtering settings or remove the filter. If it's not yours, you have no access to it.—SA
13 Feb 2013 by jiji2663
hii work in c# and asp.neti want to sent mail to some peopleand i use class and method like below code:using System.Net.Mail;public void sendmail(string Subject, string ToEmail, string Body){ SmtpClient MyMail = new SmtpClient(); MailMessage MyMsg = new...
13 Feb 2013 by V.
I think you need to create a MailAddressCollection and add the email addresses to that collection with new MailAddress("emailadres@domain.extension", "mysite"); Then you assign the collection to the To property of the MailMessage object. It could be you need to split the string on the ";"...
13 Feb 2013 by OriginalGriff
You need to call the Add method for each address in your list, and you need to convert them to MailAddress objects:mail.To.Add(new MailAddress(to));In your case, you probably want to split the names into separate strings, and add them:string[] tos = ToEmail.Split(';');foreach (string to...
13 Feb 2013 by Marco Bertschi
This code below will work fine for you:public static void SendBulkMail(Shooter sender, List receiversList, string mailtext) { MailMessage email = new MailMessage(); email.From = new MailAddress(sender.Mailaddress, string.Format("{0}, {1}",...
13 Feb 2013 by Joezer BH
Split the string on the char ';' string[] Addresses = s.Split(';');and then:MailMessage msg = new MailMessage();foreach (string address in Addresses) msg.To.Add(address);Cheers, Edo
13 Feb 2013 by nehas1jan
Hi,Go through with the below link :http://rapidprogramming.com/tutorial/ASP-Net-Sending-emails-How-to-integrate-Email-in-ASP-Net--923[^]
13 Feb 2013 by Mukund Thakker
User following code to send email to multiple recipients,MyMsg.To.Add(new System.Net.Mail.MailAddress(ToEmail));
13 Feb 2013 by vinodkumarnie
Try below...using System.Net.Mail;using System.Text;using System.Net; SmtpClient MyMail = new SmtpClient(); MailMessage MyMsg = new MailMessage(); MyMail.Host = "webmail.tahasoft.net"; MyMsg.To.Add(ToEmail); MyMsg.Subject =...
13 Nov 2012 by Ed Gepulle
i received this error when populating the dropdownlist. any suggestion pls?System.Web.UI.WebControls.DropDownListthe scenario is, a user is sending information from a c# page and will send it to the email provided.heres the code:protected void btnSubmit_Click(object sender,...
15 Nov 2012 by Ed Gepulle
Thanks for your reply. I got the solution for this, i missed to include .text with the other controls. cheers!
28 Nov 2015 by Member 8673372
using System;using System.Collections.Generic;using System.Linq;using System.Net.Mail;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class EmailSending : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { ...
28 Nov 2015 by Member 8673372
string senderID = "ravich@gmail.com"; string senderPassword = "*********"; string body = " has sent an email from "; body += "Phone : "; System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(); ...
14 Apr 2014 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
30 May 2020 by Member 11774405
hi developers!! Recently I am working on sending mail by c# coding and I tryed to send mail by c# coding on visual studio platform and it's work totally fine in my localhost of visual studio. but when I run that same code over other hosting...
30 May 2020 by RickZeeland
See the answers here: failure sending mail[^] As you seem to use an old version of the .NET framework this could also cause problems with SSL, the simplest solution is to upgrade to the newest version.
6 Mar 2023 by Gcobani Mkontwana
Hi Team I need some help, i opened up my cmd and run this command on the terminal and executed fine composer require phpmailer/phpmailer. The went to the subdirectory to copied these files over to the server(c-panel). Now the server is...
1 May 2013 by Jiban jyoti Rana
I want to design a ASP.Net form for feedback/Complaint page.My requirement is:* There sholud be two radio buttons on the top of the page.(1 is for old Complaints and another is for new complaint.)* When user clicks on old complaints then a textbox will be displayed and asking for "Your...
1 May 2013 by Thanks7872
-Have multiview control in your page with two views.Change the view according to selected value of the Radiobutton.-When you select NEW COMPLAINT,then your second view will be displayed as below.
2 May 2017 by OriginalGriff
The error message is pretty explicit:An exception of type 'System.IO.FileNotFoundException' occurred in StudentAdmission.dll but was not handled in user code The additional info even tells you exactly which file is missing! Additional information: Could not find file...
23 Jan 2015 by Member 10690878
Hi i need your support guys as the below code of sending mail part is not working as i am trying many time but i haven't receive any mail, so could you please help me to fix this case there is no any error message but no any email is coming to my inbox. ("admin@gmail.com is just a sample and...
23 Jan 2015 by sameeakhtar786
Please go through my blog you will get a working code to send email.http://sameeakhtar786.blogspot.in/[^]
24 Jan 2015 by sameeakhtar786
Nothing to do !!!Just call the method from where you want to send the message.example--First change the settings in the method and call the method as belowProtected void btnsend_click(-------------------){//do your stuff hereSendMail();}
28 Jan 2013 by kashyap10
hello,I have used EmailComposeTask to send mail.And I am trying to send mail from my windows mobile application but i can not design or format my body section...I want to change font-weight, font-size such other stuff in the body section.. please help me Thanks
29 Jan 2013 by H.Brydon
To do this you need to step back and take a much bigger bite...Instead of sending the message as plain text, you need to change it to html and use the formatting options (including font weight and size) within the html feature set.
17 Dec 2012 by Am Gayathri
In my application I would like to send a mail and I am using the below code, but I get the error: Could not send the e-mail - error: Failure sending mail. protected void btnsend_Click(object sender, EventArgs e) { try { MailMessage mailMessage = new...
17 Dec 2012 by Zafar Sultan
What's the error you are getting? Have a look at this sample:Send Mail / Contact Form using ASP.NET and C#[^]
17 Dec 2012 by Krunal Rohit
var smtp = new System.Net.Mail.SmtpClient(); { smtp.Host = "smtp.gmail.com"; smtp.Port = 587; smtp.EnableSsl = true; smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network; smtp.Credentials = new NetworkCredential(fromAddress,...
1 Apr 2022 by CHill60
This is the Quick Answers forum. If you want to give feedback you could use one of these options Email : webmaster@codeproject.com Post something in the The Lounge[^] or better in Bugs and Suggestions[^]
4 May 2017 by Hitesh Chavada
How to use two step authentication (Gmail) during sending mail in C# win form What I have tried: Try this solution security - SmtpClient in C# using smtp.Gmail.com:857 with Google's 2 Step Verification activated - Stack Overflow[^] but it's doesn't work
4 May 2017 by Nirav Prabtani
You need to generate app password from the account which has two step authentication is activated You should generate app password from here Generate App Password.[^] Formore info c# - How do I send an email with Gmail and SmtpClient when the sending account uses two factor authentication?...
7 Jan 2015 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Your question is not clear. I don't think it is related to any project or programming task.Please come up with specific issues you face during programming.
28 Aug 2019 by Jassim Rahma
Hi, I am sending email using MailMessage and setting google font for the email but the email is sent without the assigned font. Here is my body: How can i fix this please? Thanks, [^]Jassim What I have tried: body.AppendLine(""); body.AppendLine("
28 Aug 2019 by Gerry Schmitz
If the "receiver" does not have the font installed on their machine, another font from the same "font family" is substituted by the "system". Fonts are "files" and do not get downloaded automatically.
24 Apr 2013 by Abinonos
Hi;i am writing a simple class representing an email server, and a Test Method to test the provided Mail Server informations, however, when i try to connect with smtp.live.com:25 with ssl enabled i got an exception "unexpected packet format" , i'm using MailSystem.Net API and testing with...
24 Apr 2013 by Bernhard Hiller
Port 25 is normally not used with SSL. Check the specs from live.com which port you have to use (587, 997, or something like that).
5 Dec 2022 by Member 15418280
we are getting prompt window every time when we are sending mail this email can not send without a label how can restrict this pop up not to come what setting we need to do What I have tried: how can be disable popup this email can not send...
28 Feb 2019 by Member 14119835
I search everywhere but i can't get any solution how to add tag via mailchimp manager. i download mailchimp manager dll from nuget packege.Please anyone help me. What I have tried: I search everywhere but i can't get any solution how to add tag via mailchimp manager. i download mailchimp...
27 Feb 2019 by OriginalGriff
Talk to the people who created it: Marketing Platform for Small Businesses[^] They will know their product a lot better than us, and should provide tech support.
20 May 2022 by sevketkarayilan
I bought a code project account years ago, but I did not confirm. I have never changed my email. how can i confirm my mail now What I have tried: I entered my user information, but I could not find the confirm your e-mail section.
20 May 2022 by OriginalGriff
You need to talk to the staff directly, rather than ask in a general forum like QA. Try asking again here: Bugs and Suggestions[^] and they will help you out.
7 Sep 2012 by Faiz_Khan
I developed a school software where i want that the student interact with each other with email within the software.1) how can i develop the mailing system?2) the mail is stored in the database(MSsql etc) or simple stored as a text file?3) how the process goes?etc etc...thanxFaiz
7 Sep 2012 by OriginalGriff
Those aren't questions we can answer: they are your design features.1) how can i develop the mailing system?In the same way you would develop any other project: specify, design, document, code, test, repeat.2) the mail is stored in the database(MSsql etc) or simple stored as a text...
6 Aug 2015 by Sergey Alexandrovich Kryukov
For this forum, this is probably nearly off-topic, but I used to answer similar questions: SSRS interview questions and answers[^].It's pretty much useless to prepare interview questions…—SA
6 Aug 2015 by Dave Kreskowiak
Looking for the answers to possible interview questions is a complete waste of time. There is no guarantee that you're ever going to get asked those questions and there's a possibility that's going to trip you up and you'll lose the job.You're going to get asked a bunch of questions where...
29 Nov 2016 by Member 12684412
Hi , i need receive mail (id,subject,from,date,conversationid,name) .What need for this ? Reference , api or another things. Help me pls.What I have tried:I used LimiLabs but need purchase for use