Php 使用swiftmailer发送邮件,但页面变为空白,没有任何消息

Php 使用swiftmailer发送邮件,但页面变为空白,没有任何消息,php,email,smtp,swiftmailer,Php,Email,Smtp,Swiftmailer,我正在使用swiftmailer发送邮件,但没有消息发送到收据,页面变为空白,没有任何消息。我正在使用gmail smtp。我的php.ini文件中没有任何更改。我的php.ini文件中是否需要任何更改。openssl.dll aleady解除阻止。请帮助我。这很紧急。如果我想用ip代替smtp.gmail.com,那么我会在这里更改。这是我的密码 <?php require_once 'lib/swift_required.php'; $transport = Swift_SmtpTra

我正在使用swiftmailer发送邮件,但没有消息发送到收据,页面变为空白,没有任何消息。我正在使用gmail smtp。我的php.ini文件中没有任何更改。我的php.ini文件中是否需要任何更改。openssl.dll aleady解除阻止。请帮助我。这很紧急。如果我想用ip代替smtp.gmail.com,那么我会在这里更改。这是我的密码

<?php
require_once 'lib/swift_required.php';
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com',465,'ssl');
$transport-> setUsername('my@gmail.com');
$transport-> setPassword('*******');
$mailer = Swift_Mailer::newInstance($transport);
$message = Swift_Message::newInstance();
$message->setSubject($subject);
$message->setFrom(array($headers=>$myname));
$message->setTo($value);
$message->setBody($mail_body, 'text/plain');
$result = $mailer->send($message);
?>