phpmailer

tp5.1相关

空扰寡人 提交于 2020-02-12 13:27:17
这里只是个人记录用的~~~ 1. 生成项目 composer create-project topthink/think=5.1.* tp5(tp5为文件夹名 也就是项目名) 2. 生成模块 php think build --module admin 3. 生成控制器 php think make:controller admin/Index --plain 4. 生成模型 php think make:model admin/User 5. 生成验证器 php think make:validate admin/User 6. nginx修改内容部分 location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } try_files $uri $uri/ /index.php$is_args$args; autoindex on; } 7. 邮件扩展 http://packagist.org 搜phpmailer 安装命令:composer require phpmailer/phpmailer直接在项目目录下面执行 配置写在了application目录下的common.php这个公共文件中 方法如下: <?php // 应用公共文件 // 发送邮件 use

how to fix SSL certificate verification failure

夙愿已清 提交于 2020-02-04 09:50:56
问题 I use PHPMailer, along with Apache and PHP, locally. When I test my SSL config and my cacerts I get default_cert_file = C:\Program Files\Common Files\SSL/cert.pem default_cert_file_env = SSL_CERT_FILE default_cert_dir = C:\Program Files\Common Files\SSL/certs default_cert_dir_env = SSL_CERT_DIR default_private_dir = C:\Program Files\Common Files\SSL/private default_default_cert_area = C:\Program Files\Common Files\SSL ini_cafile = ini_capath = and then, I do var_dump(fsockopen("smtp.gmail.com

Why is PHP mailer printing mimeheader to screen after send?

谁说胖子不能爱 提交于 2020-02-02 12:56:55
问题 Here is the problem, I have just implemented PHPMailer and it is printing the Mime Header to the screen after the email is sent. I am using the latest PHPMailer code listed on GITHUB, and I have gone through virtually everything but cant find any reason why this is printing to the screen. Let me know if you need anymore information. I cant seem to think of anything else. See below: 2013-09-30 20:37:14 CLIENT -> SERVER: AUTH LOGIN 2013-09-30 20:37:14 CLIENT -> SERVER:

Why is PHP mailer printing mimeheader to screen after send?

你离开我真会死。 提交于 2020-02-02 12:56:28
问题 Here is the problem, I have just implemented PHPMailer and it is printing the Mime Header to the screen after the email is sent. I am using the latest PHPMailer code listed on GITHUB, and I have gone through virtually everything but cant find any reason why this is printing to the screen. Let me know if you need anymore information. I cant seem to think of anything else. See below: 2013-09-30 20:37:14 CLIENT -> SERVER: AUTH LOGIN 2013-09-30 20:37:14 CLIENT -> SERVER:

Can I open socket in PHP from a specific IP (if the machine has two IPs)?

故事扮演 提交于 2020-02-02 06:54:12
问题 I'm using PHPMailer and it uses fsockopen to access the SMTP server. But the machine has two IPs with different reverse DNS records. So in email headers I got the following: Received: from one-server.tld (HELO another-server.tld) ... I need to hide one-server.tld in favor of another-server.tld . But I need both IPs with their current RDNS settings. 回答1: I think its not possible using fsockopen . But its possible in curl , fopen and stream functions. What you need is stream_socket_client()

PHPMailer $mail->From headers not working with gmail

情到浓时终转凉″ 提交于 2020-01-29 13:17:06
问题 I'm using the following code to send a mail after a form submission with the PHP mailer class https://github.com/Synchro/PHPMailer. The mail sends and is received successfully. The only thing that isn't wokring is the following: $mail->From = $email; $email is the email that a user will enter on the form (it is set with a $_POST variable). I would like the email to appear that it's from the user who filled out the form, so I can hit reply and have it go to their email address. However, the

PHPMailer on remote host does't work

和自甴很熟 提交于 2020-01-25 18:01:44
问题 I'm working on a little e-cards project. I have to send emails from my remote server with PHPMailer. localy I'm using this configuration (with my own Gmail email adress) and it works perfectly. /ssi/mail.config.php <?php $mail = new PHPMailer(true); $mail->CharSet = 'utf-8'; $mail->SMTPDebug = 2; $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; $mail->Port = '587'; $mail->SMTPSecure = 'tls'; $mail->SMTPAuth = true; $mail->Username = 'private@gmail.com'; $mail->Password = '***secret***'; $mail

PHPMailer semi issue

一曲冷凌霜 提交于 2020-01-25 06:42:46
问题 I have a strange issue with PHPMailer, when I try to send an email I see this error: escapeshellcmd() has been disabled for security reasons but if I check the email, I can see that the email is sent, how can I fix/hide this problem? 回答1: Use this code that's it, hope it will help: use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'PHPMailer/src/Exception.php'; require 'PHPMailer/src/PHPMailer.php'; require 'PHPMailer/src/SMTP.php'; $mail = new PHPMailer(true);

PHPMailer Connection error

谁说胖子不能爱 提交于 2020-01-24 23:02:33
问题 i got an error with my php mailer. It says: "Message could not be sent. Mailer Error: SMTP connect() failed." I tried these smtp settings on a wordpress newsletter plugin, and they worked there, so i dont know why this dont work. The port need to be 587, because of my host. $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'mail.mysite.com'; // Specify main and backup SMTP servers $mail->port = "587"; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP

icalendar and phpmailer.php

偶尔善良 提交于 2020-01-24 18:20:07
问题 i am trying to send icalendar to the users, so that they can open these ics files in outlook and save the appointment. mailer i am using is 'phpmailer.php'. problem is that it sends ical format as html in message body. Here is my code $text=" BEGIN:VCALENDAR VERSION:1.0 BEGIN:VEVENT CATEGORIES:MEETING STATUS:TENTATIVE DTSTART:".$startDateTime." DTEND:".$endDateTime." SUMMARY:Interview for the candidate".$cname." DESCRIPTION:".$message." CLASS:PRIVATE END:VEVENT END:VCALENDAR"; $mail->SetFrom(