PDA

View Full Version : سوال: ارسال ایمیل در لوکال هاست



mbasirati
چهارشنبه 03 دی 1393, 20:25 عصر
سلام
من یه وب سایت دارم که در بعضی بخش ها به کاربر ایمیل ارسال میکنه.
آیا میشه به صورت لوکال ایمیل ارسال کرد یا حتما پروژه باید آپ بشه؟
من روی هاستی که قراره بعدا روش آپ بشه اکانت ایمیل ساختم و اطلاعاتش رو توی برنامم وارد کردم. راهی هست که بدون آپ کردن ایمیل ارسال بشه؟

aroshanzamir
چهارشنبه 03 دی 1393, 22:15 عصر
سلام دوست من به صورت لوکال هم همیشه .. فقط کافی یک ایمیل مثلا Gmail داشته باشی
///

mbasirati
چهارشنبه 03 دی 1393, 23:30 عصر
من از این پست (http://www.aspsnippets.com/Articles/Send-email-using-Gmail-SMTP-Mail-Server-in-ASPNet.aspx) برای ارسال ایمیل توسط سرور جیمیل استفاده کردم.
ولی با همچین اروری مواجه شدم:

System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 173.194.65.108:25
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Bool ean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6)
at System.Net.PooledStream.Activate(Object owningObject, Boolean async, GeneralAsyncDelegate asyncCallback)
at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
at System.Net.Mail.SmtpConnection.GetConnection(Servi cePoint servicePoint)
at System.Net.Mail.SmtpTransport.GetConnection(Servic ePoint servicePoint)
at System.Net.Mail.SmtpClient.GetConnection()
at System.Net.Mail.SmtpClient.Send(MailMessage message)
--- End of inner exception stack trace ---
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Utilities.SendMail(String from, String to, String subject, String body) in g:\Dropbox\Project\MicroShop\App_Code\Utilities.cs :line 30
at register.lkBtnRegister_OnClick(Object sender, EventArgs e)