首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >什么是快速邮件中的“运输”?

什么是快速邮件中的“运输”?
EN

Stack Overflow用户
提问于 2018-09-21 00:39:22
回答 1查看 0关注 0票数 0

我正在为一所大学开发一个网络应用程序,希望在提交表单后使用swift-mailer发送确认电子邮件。我理解以下代码的其余部分,但我不确定$ transport我应该放在'smtp.example.org'的位置?

代码语言:javascript
复制
$transport = (new Swift_SmtpTransport('smtp.example.org', 25))
  ->setUsername('your username')
  ->setPassword('your password')
;

// Create the Mailer using your created Transport
$mailer = new Swift_Mailer($transport);

// Create a message
$message = (new Swift_Message('Wonderful Subject'))
  ->setFrom(['john@doe.com' => 'John Doe'])
  ->setTo(['receiver@domain.org', 'other@domain.org' => 'A name'])
  ->setBody('Here is the message itself')
  ;

// Send the message
$result = $mailer->send($message);
EN

回答 1

Stack Overflow用户

发布于 2018-09-21 10:27:29

我建议您阅读以下内容:https//www.makeuseof.com/tag/technology-explained-how-does-an-email-server-work/

TLDR:

您应该输入电子邮件服务器的地址。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/-100002707

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档