Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Additional information: Insufficient system storage. The server response was: 4.3.1 Insufficient system storage

What I have tried:

public void SendMail (string ReservationNumber, string ReceiverEmail, string FirstName, string LastName)
{

string Host = ConfigurationManager.AppSettings["Host"];
int Port = Convert.ToInt16(ConfigurationManager.AppSettings["Port"]);
string Domain = ConfigurationManager.AppSettings["Domain"];
string SenderEmail = ConfigurationManager.AppSettings["SenderEmail"];
string AdminEmail = ConfigurationManager.AppSettings["AdminEmail"];

string MailBody;
string MailSubject = "Reservation";

string filePath = Server.MapPath("~/reservation-welcom.htm");
//string mailTextTemplate = ReadFromFile(filePath);
string mailTextTemplate = System.IO.File.ReadAllText(filePath);
//TextReader textReader = File.OpenText("~/register_confirm.htm"); // or

MailBody = mailTextTemplate;


MailBody = MailBody.Replace("~~receiverName~~", FirstName + " " + LastName);
MailBody = MailBody.Replace("~~siteName~~", "www.ridecentric.com");
MailBody = MailBody.Replace("~~siteTitle~~", "www.ridecentric.com");
MailBody = MailBody.Replace("~~reservationNumber~~", ReservationNumber);

MailBody = MailBody.Replace("~~adminEmail~~", SenderEmail);
MailBody = MailBody.Replace("~~adminName~~", "Admin");


MailSubject = MailSubject.Replace("~~receiverName~~", ReceiverEmail);
MailSubject = MailSubject.Replace("~~siteName~~", "www.ridecentric.com");
MailSubject = MailSubject.Replace("~~siteTitle~~", "RideCentric");
MailSubject = MailSubject.Replace("~~adminEmail~~", AdminEmail);
MailSubject = MailSubject.Replace("~~adminName~~", "Admin");

MailMessage message = new MailMessage(SenderEmail, ReceiverEmail, MailSubject, MailBody);

message.Attachments.Add(new Attachment(Server.MapPath("~/Pdf/") +"Test.pdf"));
message.IsBodyHtml = true;

if (ReceiverEmail != "")
{
SmtpClient client = new SmtpClient(Host, Port);
client.EnableSsl = false;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.Send(message);
message.Dispose();

}






}
Posted
Updated 28-Mar-16 20:11pm

1 solution

It's a server-side problem.
Maybe this article will sched a light on it for you:
Not receiving email - "4.3.1 Insufficient system resources"[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900