Tag: SMTP

PHPMailer – SMTP错误:从我的服务器发送邮件时,密码命令失败

我已经使用phpmailer()的概念,从我的共享服务器使用PHP脚本的用户发送邮件,但我不能够发送,即使一切都是正确的在我的脚本根据phpmailer代码。 我的代码是这样的: $message = " This is testing message from my server"; $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->Host = "smtp.gmail.com"; $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'ssl'; // secure transfer enabled […]

使用Gmail SMTP服务器“远程证书根据validation程序无效”

我得到这个错误: 根据validation程序,远程证书无效。 每当我尝试使用Gmail的SMTP服务器在我的C#代码发送电子邮件。 有人能指出我解决这个问题的正确方向吗? 以下是堆栈跟踪… at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) […]

我怎样才能通过SSL与SMTP发送电子邮件?

有没有一种方法使用.NET Framework通过端口465上的SSL SMTP服务器发送电子邮件? 通常的方式: System.Net.Mail.SmtpClient _SmtpServer = new System.Net.Mail.SmtpClient("tempurl.org"); _SmtpServer.Port = 465; _SmtpServer.EnableSsl = true; _SmtpServer.Credentials = new System.Net.NetworkCredential("username", "password"); _SmtpServer.Timeout = 5000; _SmtpServer.UseDefaultCredentials = false; MailMessage mail = new MailMessage(); mail.From = new MailAddress(from); mail.To.Add(to); mail.CC.Add(cc); mail.Subject = subject; mail.Body = content; mail.IsBodyHtml = useHtml; _SmtpServer.Send(mail); 超时: System.Net Verbose: 0 : [1024] SmtpClient::.ctor(host=ssl0.ovh.net, port=465) […]

php.ini&SMTP = – 如何通过用户名和密码

My ISP帐户要求我发送出站SMTP邮件的用户名和密码。 执行php.mail()?时如何让PHP使用它php.mail()? php.ini文件只包含服务器(SMTP= )和From: (sendmail_from= )条目。

如何在ASP.NET C#中发送电子邮件

我很新的ASP.NET C#领域。 我打算通过ASP.NET C#发送邮件,这是我的ISP的SMTP地址: smtp-proxy.tm.net.my 以下是我试图做的,但失败了。 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="SendMail" %> <html> <head id="Head1" runat="server"><title>Email Test Page</title></head> <body> <form id="form1" runat="server"> Message to: <asp:TextBox ID="txtTo" runat="server" /><br> Message from: <asp:TextBox ID="txtFrom" runat="server" /><br> Subject: <asp:TextBox ID="txtSubject" runat="server" /><br> Message Body:<br> <asp:TextBox ID="txtBody" runat="server" Height="171px" TextMode="MultiLine" Width="270px" /><br> <asp:Button ID="Btn_SendMail" runat="server" onclick="Btn_SendMail_Click" Text="Send Email" […]

如何使用Python发送电子邮件作为提供者?

我正尝试使用python发送电子邮件(Gmail),但是我收到以下错误消息。 Traceback (most recent call last): File "emailSend.py", line 14, in <module> server.login(username,password) File "/usr/lib/python2.5/smtplib.py", line 554, in login raise SMTPException("SMTP AUTH extension not supported by server.") smtplib.SMTPException: SMTP AUTH extension not supported by server. Python脚本如下。 import smtplib fromaddr = 'user_me@gmail.com' toaddrs = 'user_you@gmail.com' msg = 'Why,Oh why!' username = 'user_me@gmail.com' password = 'pwd' server […]

使用codeigniter电子邮件库发送带有gmail smtp的电子邮件

<?php class Email extends Controller { function Email() { parent::Controller(); $this->load->library('email'); } function index() { $config['protocol'] = 'smtp'; $config['smtp_host'] = 'ssl://smtp.gmail.com'; $config['smtp_port'] = '465'; $config['smtp_timeout'] = '7'; $config['smtp_user'] = 'mygmail@gmail.com'; $config['smtp_pass'] = '*******'; $config['charset'] = 'utf-8'; $config['newline'] = "\r\n"; $config['mailtype'] = 'text'; // or html $config['validation'] = TRUE; // bool whether to validate email or […]

Gmail错误:SMTP服务器需要安全连接或客户端未通过身份validation。 服务器响应是:5.5.1需要身份validation

我正在使用以下代码发送电子邮件。 该代码在我的本地计算机上正常工作。 但在生产服务器上,我收到错误消息 var fromAddress = new MailAddress("mymailid@gmail.com"); var fromPassword = "xxxxxx"; var toAddress = new MailAddress("yourmailid@yourdoamain.com"); string subject = "subject"; string body = "body"; System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient { Host = "smtp.gmail.com", Port = 587, EnableSsl = true, DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network, UseDefaultCredentials = false, Credentials = new NetworkCredential(fromAddress.Address, fromPassword) }; using (var message […]

从SMTP服务器使用PHP发送电子邮件

$from = "someonelse@example.com"; $headers = "From:" . $from; echo mail ("borutflis1@gmail.com" ,"testmailfunction" , "Oj",$headers); 我无法在PHP中发送电子邮件。 我得到一个错误: SMTP server response: 530 SMTP authentication is required 。 我的印象是,你可以发送电子邮件没有SMTPvalidation。 我知道这封邮件会被过滤掉,但现在没关系。 [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = someonelse@example.com 这是php.ini文件中的设置。 我应该如何设置SMTP? 有没有需要validation的SMTP服务器,或者我必须自己设置服务器?

如何检查电子邮件地址是否存在,而不发送电子邮件?

我遇到这个PHP代码来检查使用SMTP的电子邮件地址,而不发送电子邮件 。 有没有人尝试类似的东西,或为你工作? 你可以告诉一个电子邮件客户/用户input是否正确和存在?