Click here to Skip to main content
15,887,596 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 Updated

Mail 

16 Aug 2014 by Abhinav S
At the bottom of the article there is a comments and discussion section.If you post your question there, the author may reply to it.
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...
20 Mar 2015 by Afzaal Ahmad Zeeshan
You should know that there is something know as a variable in programming. Which can be filled with any value that your application (or more specifically "you") want to use. So for example, if you use the WebMail class to send the email, then the following code would be used,// client,...
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...
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...
12 Mar 2015 by Afzaal Ahmad Zeeshan
That is because of the port you're using and the server isn't responding to the request of yours at that port. Change the port to 25 and then retry. I have always used 25, and it always worked.
9 Apr 2013 by Ag_Sharad
I am currently working on a event management site project, and i want that as soon as clients fill the form and submit them, a copy of form along with the html(like a screenshot of filled form) is to be mailed to the client and managers......How can we achieve this thing using php scripting?
28 Dec 2013 by agent_kruger
I need credentials of a website named "Mail.com". A client provided his id ("sp********ion@asia.com") that is in "Mail.com". http://www.mail.com/in-en/[^]Now i need smtp name and ssl how do i get it. So far i tried smtp name "smtp.aol.com","mail.com","smtp.mail.com" and ssl true and...
20 Mar 2015 by Ajith_joseph
Hi All,I would like to develop an option in my project to contact the seller. It should something like Ebay contact seller. The from and replay mail ids should be from my domain and the message should be sent to the seller. How do I can develop a contact seller option via email like...
12 Oct 2012 by Al Hizbul
Try this:Email messages going to spam folder
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...
18 Dec 2012 by Am Gayathri
In my application I would like to send a mail and I am using the below code,protected void SendMail() { // Gmail Address from where you send the mail var fromAddress = "xxxxx@gmail.com"; // any address where the email will be sending var toAddress =...
6 Aug 2020 by Amanda_C
I get an "undefined index error" each time i try to upload documents. I am looking to upload multiple documents through a form and submit it to sengrid as an attachment. This is my code snippet below " $file_parts =...
5 Jul 2012 by amineel9
hello, i'm trying to make a mail test w/out attachment, but i have a bit of a problem, here is the code public boolean send() throws MessagingException { Properties props = _setProperties(); if (!_user.equals("") && !_pass.equals("") && _to.length > 0 && !_from.equals("")...
12 Oct 2012 by ammoti
Hi everyone,There is use mail api.But always mail go junk in Hotmail. How to prevent this mails to junk.My using mail template.xxxxxx/TITLE>
21 Jan 2014 by Antonio Massafra
Hi,You haven't need to use linq for send an email...in vs2008 (and also in 2003) you must use something like thisImports System.NetImports System.Net.Mail...Dim mailMessage As New MailMessage()mailMessage.Subject = "oggetto"mailMessage.SubjectEncoding =...
27 Feb 2013 by Anuja Pawar Indore
Refer this article on CPSend mail using System.Web.Mail namespace[^]
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
8 May 2013 by Archit Patel
I use nopCommerce 1.50 for my online Shop. But i can't config my mail setting in it.i use this type of settings'Store Admin Email: myGmailEmailAddress@gmail.com Store Admin Email Display Name: mySTORENAME OR Any name you wantHost: smtp.gmail.comPort: 587User: ...
10 Dec 2013 by Ariana Bond
I need to setup mail server for my dedicated server for my domain to send bulk email.Any help would be appreciated.
14 Jul 2016 by Aritra Nath
Hi guys,The problem is whenever i am sending mails from the mail id of my server to a gmail id, its ending up in the spam folder. How do i stop this??Please help..Thanks..
18 Dec 2012 by ark1234
Have you tried this way refer link belowhttp://asp.net-tutorials.com/misc/sending-mails/[^]you also need to have setting in web.configreferhttp://community.discountasp.net/showthread.php?t=9157[^]
22 Nov 2014 by Arlert
Try to configure certificates on serverI had the same problem on linux server, and after i wrote this in terminal:certmgr -ssl smtps://smtp.gmail.com:465mozroots --import --ask-removeall worked fine
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.
18 May 2014 by bagus bujangga
Hi there, I try to send email using PHPMailer, here my code:require '/****/*****/******/PHPMailer-master/PHPMailerAutoload.php';$mailltoadm = new PHPMailer;$mailltoadm->isSMTP(); // Set mailer to use SMTP$mailltoadm->Host = 'localhost'; // Specify main and backup SMTP...
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...
4 Sep 2016 by Beginner Luck
mailMessage = new MailMessage("xxxx@gmail.com", "yyyy@gmail.com", "Message from PSSP System", "This email sent by the PSSP system" + "this is bold text!");mailMessage.IsBodyHtml = true;
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).
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[^]
28 Feb 2016 by Bipin Paul
Implementation of Contact Us Page using ASP.NET MVC pattern
23 Sep 2012 by Boudi AlSayed
Hi, I want to make a Hotmail new messages counter just give the number of unread messages of a specific email and password. How it would be done?
7 Nov 2012 by CBadger
You can create a Method to send the mail through proxy...MailAddress from = new MailAddress("from@mailserver.com");MailAddress to = new MailAddress("to@mailserver.com");MailMessage mm = new MailMessage(from, to);mm.Subject = "Subject"mm.Body = "Body";SmtpClient client = new...
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
21 Mar 2022 by CHill60
I suggest posting this in Bugs and Suggestions[^] rather than in the Quick Answers coding forum. The Bugs & Sugs forum is actively monitored by the site admin, whereas this one is not
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[^]
3 Oct 2016 by Codes DeCodes
I have a HTML formatted email body content that comes from database table. When the mail is send, the body is to be formatted and rendered in users mail box in the way it is formatted and saved in db. (HTML formatting).The code in database is : This is body
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 Codes DeCodes
My body string body = diagnosticTestMailContent.Mail_Body;was carryinh html tags in it. It was directly being rendered. I added the body to stringbuilder and then it started working.
17 May 2020 by Cody O'Meara
I am trying to send an email with PHPMailer. When the email sends it doesn't display the table but part of the code. This is how the email comes in as text setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $conn->prepare("SELECT...
8 Sep 2014 by cogi83
A SW to send your WAN IP and other info via email
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').
19 Oct 2014 by CPallini
I would Google for that:"VB6 send sms"[^]."VB6 send email"[^].
22 Apr 2017 by CyberSaint
Hello, EveryBody !! My Problem is I want to receive the data when user fills the contact us a form of my website I want the data to be received through mail. when user click submits button. I don't want to use the local client mailer ... I have HTML website and I can't make functionality with...
29 May 2014 by DamithSL
check below links:How to Send a Scheduled HTML Report Directly from SQL Server[^]Sending scheduled SQL query results via HTML e-mail using SSIS[^]Dynamically Generating Html/Excel/Word Document Files with SQL Server data using SSIS 2005[^]Automated Email Notifications using SQL Server...
19 May 2016 by Danyal Awan
it wait at client.Send(mail); and give exceptionSystem.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode...
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...
26 Nov 2015 by Dave Kreskowiak
You have a few problems. First, you have no control over the mail server you're using unless you set one up yourself. This means you are at the mercy of the policies setup on the mail server you're using to send the emails. No, you can't do anything without one.This means that if the owner...
14 Jan 2016 by Dave Kreskowiak
Ask this in the Bugs and Suggestions - CodeProject[^] forum, not in QA.
26 May 2016 by Dave Kreskowiak
The WHERE clause in your UPDATE statement should include the status as well:UPDATE EmailMaster SET status = 'I' WHERE mailid = 12345' AND status = 'P'If the update fails, your code will know that another service has checked out the record.But, seriously, I'd have some app running that is...
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...
17 May 2020 by Dave Kreskowiak
I hate to break it to you but you cannot run any code in an HTML email. It would be a huge security risk.
6 Feb 2024 by Dave Kreskowiak
You might also want to check the name of the SMTP server. You have to use a fully qualified DNS name for the server, which is most definitely NOT "smtppec". You can get the correct name from the documentation of whatever mail service or ISP...
8 Feb 2024 by Dave Kreskowiak
Yes, Outlook considers the signature as part of the email body. It's just something that gets pre-populated on a new email. If you specify the signature in a mailto link, Outlook will skip adding the signature to the email and replace the body...
22 Apr 2017 by De2
Hi! I have a similar problem for a website, and i found this. But i haven't tried it yet ^^'.
10 Oct 2013 by deepakdynamite
I have got this by writing select From,To,Subject, Body from xyz. and for example it returned 20 records and i want to send mails. Is it possible directly ??? without using Cursor and all ??
9 Dec 2020 by Demetri K.2
php artisan make:mail WhateverName Gives this error: UnexpectedValueException Invalid route action: []. at C:\Program Files (x86)\Ampps\www\instaclone\vendor\laravel\framework\src\Illuminate\Routing\RouteAction.php:92 88▕ ...
4 Dec 2017 by Dev O'Connor
Evening i am trying to automate a service status email from a select number of services. when i run the script with sh -x ./myscriptname.sh it works absolutely fine. But when installed as a cron, i get a constant error service: command not found The shell script is as follows: #!/bin/sh...
17 Aug 2021 by Devendra Sarang
I am trying send an email from vb.net code using smtp. When i am trying to send an email to any "gmail" account, it is sending successfully. but when i am trying to send an email to yahoo account, e.g "account.ymail.com" then unable to receive...
15 Apr 2013 by DinoRondelly
This should point you in the right directionhttp://stackoverflow.com/questions/1092723/how-do-you-build-a-web-based-email-client-using-php[^]
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...
9 Jan 2018 by dravoss
I am using phpmailer for sending emails, but I want to make a custom header for my compaign, by adding a textarea field that contain any custom header here is my code but i dont know where is the problem it not working i dont see my custom header in mail full header : $headers = []; ...
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...
17 May 2016 by dravoss
Hello ,i tried to use this code to replace any __Random_and[x,y] with rand(x,y) but it didn't run please help me function charCallbackRand($matches1){ $charOne = (int)$matches1[1]; $charTwo = (int)$matches1[2]; return rand($charOne,$charTwo); } $myword =...
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!
8 Dec 2012 by enrique1203
Check this example private void EnvioCorreo(Empleado empleado, string clave) { #region Cargando configuración del servidor de correo string MailServer = "name server example smtp.gmail.com"; string MailServerPort = ""587; string MailServerUser =...
12 Mar 2015 by F-ES Sitecore
The solution to this is to not send email from gmail's smtp servers, send them through GoDaddy's smtp server.http://vandelayweb.com/sending-asp-net-emails-godaddy-gmail-godaddy-hosted/[^]A fuller explanation as to why is detailed here;http://forums.asp.net/post/5825785.aspx[^]
12 Oct 2015 by F-ES Sitecore
Set UseDefaultCredentials to false before you set the Credentials propertyhttps://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.usedefaultcredentials(v=vs.110).aspx[^]
10 Jan 2016 by F-ES Sitecore
It's unlikely the File.Exists is going to evaluate true as you're not specifying the directory to look for the file in. If fileName contains the full path, including drive and folder, then adding "Annex_" to the front is making your code look forAnnex_c:\myfolder\myfile.txtwhich is...
21 Oct 2016 by F-ES Sitecore
Configure Exchange so that "EmailSender" has the rights to send messages on behalf of other people. You'll need to google how you do that, Exchange config is outside the scope of this site.
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
2 Mar 2017 by Gabriel Sas
here is my code:System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add("test@gmail.com"); message.Subject = "Nici un Clinet valabil pentru reparare"; message.From = new...
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...
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...
7 Mar 2023 by Gcobani Mkontwana
Hi Team I have two files, one is for application for a loan and second is attaching pdf from the form and sends it as pdf. But the problem now i am getting both email gets sends and dont want that. What i am trying is as soon app.php loads data...
17 May 2016 by George Jonsson
Instead of using a preg_replace_callback() you can directly insert the wanted numbers from the original text with preg_replace()Try this:$string = '__Random_and[22,95]';$pattern = '/__Random_and\[(\d+),(\d+)\]';$replacement = 'rand($1,$2)';$result preg_replace($pattern,...
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.
20 Oct 2015 by Gokulprasad05
MailMessage msg = new MailMessage(); msg.To.Add(new MailAddress("someone@somedomain.com", "SomeOne")); msg.From = new MailAddress("you@yourdomain.com", "You"); msg.Subject = "This is a Test Mail"; msg.Body = "This is a test message using Exchange OnLine"; msg.IsBodyHtml...
15 Mar 2018 by Graeme_Grant
The question is made up of many moving parts. Break it down into its individual units to make it easier for you to work with: 1. Service layer: * sending mail - MS internal API or using 3rd party library; write code to send an email as a contained service * data from MS Excel - use MS Interop,...
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.
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,...
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"); ...
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
5 May 2015 by Jamil Isayyed
Hello Folks,i have been trying to create a transport agent which change the Body format for internal mails which use the TNEF parts - Internal emails.what i found that the body format changed from HTML to none when i created a TNEFwriter object as follow: MimePart tnefPart...
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...
5 Aug 2023 by Jason Sultana
Common practice that I employ in test projects - re-usable mocks
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("
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 .=...
8 Oct 2018 by Jayanta Modak
showing Error "Failure sending mail." please help me i used port 587 because maximum example 587 used this port how i can know the my mail port or it is right error in this line SMTP.Send(Mail) massage is:- Just "Failure sending mail." What I have tried: Imports System.Net.Mail Public...
16 May 2019 by jerryr4
I was looking for a particular article in a recent issue, but only found the mailouts which I hadn't deleted yet Jerry What I have tried: Looked around the CodeProject site
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...
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...
29 Apr 2013 by Joan M
Hello,I've got a notification from one of our customers which say that their mail server won't allow our e-mails to proceed into their system as we are on a blacklist.I've seen that our public IP address is on some blacklists (4 or so) and I've started the procedure of removing our IP...
11 Jun 2014 by Joan M
Hello all,Nowadays we do have the mail server configured with an account that grabs all the mails sent to wrong addresses in our domains...I'm thinking on changing that redirection to a mail automated answer explaining the sender that the address has not been correctly written.I...
8 Feb 2024 by Joan M
Hello all, INTRODUCTION (jump to the question if you want) Every month I end up navigating through the sent mails to find the last mail I sent to that specific customer, then copy the contents, create a new mail, paste the contents, copy the...
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 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....
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