Ich habe Kontakt Formular auf meiner Website. Haben Sie Windows-Hosting mit GoDaddy. Als ich Kontakt von in meinem localhost prüfte, arbeitete es &, die Post sendet, aber, indem er bewirtet gibt Ausnahmen.Mail nicht vom Webhosting-Server senden
System.Net.Mail.SmtpException: Fehler beim Senden von E-Mails. ---> System.Net.WebException: Verbindung zum entfernten Server nicht möglich ---> System.Net.Sockets.SocketException: Es wurde versucht, auf einen Socket zuzugreifen, der durch seine Zugriffsberechtigungen 74.125.130.108:587 verboten wurde System.Net.Sockets.Socket.DoConnect (EndPoint endPointSnapshot, SocketAddress socketAddress) bei System.Net.ServicePoint.ConnectSocketInternal (Boolean connectFailure, Socket s4, Socket s6, Socket & Socket, IPAddress & Adresse, ConnectSocketState-Status, IAsyncResult asyncResult, Ausnahme & Ausnahme) --- Ende der inneren Ausnahme Stack-Trace --- bei System.Net.ServicePoint.GetConnection (PooledStream PooledStream, Objekt Besitzer, Boolean async, IP-Adresse & Adresse, Socket & abortSocket, Socket & abortSocket6) bei System.Net. PooledStream.Activate (Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback) unter System.Net.PooledStream.Activate (Object owningObject, GeneralAsyncDelegate asyncCallback) unter System.Net.ConnectionPool.GetConnection (Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) bei System.Net.Mail.SmtpConnection.GetConnection (ServicePoint servicePoint) at System.Net.Mail.SmtpTransport.GetConnection (ServicePoint-Dienstpunkt) bei System.Net.Mail.SmtpClient.GetConnection() bei System.Net.Mail.SmtpClient.Send (MailMessage-Nachricht) --- Ende des inneren Ausnahmestapel-Trace - - bei System.Net.Mail.SmtpClient.Send (Mailmessage message) an DynamicPage.sendInquiry_Click (Object sender, EventArgse) in G: \ PleskVhosts \ brandstik.in \ httpdocs- \ DynamicPage.aspx.vb: Linie 173
try {
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient();
mail.To.Add("[email protected]com");
mail.From = new MailAddress(inquiryEmail.Text);
mail.Subject = "Quote Request For " + quoteID.Text;
mail.Body = "New Quote request from customer<br /><br/>Customer Name - '" + inquiryName.Text + "' <br />Customer Email - '" + inquiryEmail.Text + "'<br />Customer Contact - '" + inquiryNumber.Text + "'<br />Comment - '" + inquiryMessage.Text + "'";
mail.IsBodyHtml = true;
SmtpServer.Port = 587;
SmtpServer.Credentials = new System.Net.NetworkCredential("[email protected]", "1234567890");
SmtpServer.Host = "smtp.gmail.com";
SmtpServer.EnableSsl = true;
SmtpServer.Send(mail);
Response.Write("Sent");
} catch (Exception ex) {
//Response.Write("<script language='javascript'>alert('Your SMTP Server needs to get configured to contact form work.');</script>")
Response.Write(ex);
}
Wenden Sie sich an die GoDaddy-Unterstützung und vergewissern Sie sich, dass die App nicht blockiert wird! –
Verweisen Sie darauf: [Google Mail-SMTP funktioniert nicht mehr im Godaddy-Server] (http://forums.asp.net/t/2094021.aspx?Gmail+SMTP+nicht+mehr+bei+Godaddy+Server) –
Sie können Sie müssen auf Ihr Google Mail-Konto zugreifen, indem Sie HTTP anstelle von SMTP verwenden, um die Einschränkungen von GoDaddy zu umgehen. Betrachten Sie die Google Mail-API: https://developers.google.com/gmail/api/guides/ – Michael