开发者

How to get started using SwiftMailer

开发者 https://www.devze.com 2023-01-11 14:55 出处:网络
I wanna use swiftmailer to send the results of开发者_如何学编程 a form to a gmail account. I\'m new to php (and new to ubuntu), and in the stage of being (embarrasingly) lost even when reading the d

I wanna use swiftmailer to send the results of开发者_如何学编程 a form to a gmail account.

I'm new to php (and new to ubuntu), and in the stage of being (embarrasingly) lost even when reading the documentation.

Questions:

a) Where do I extract the library? I placed it on my desktop. Shouldn't it go in some apache folder?

b) How would a sample message sent to a gmail inbox would look like?


As long as there are permissions set so your webserver can read the directory, you can put this library where ever you like. So if your webserver serves pages from /var/www/htdocs, maybe you should put this at /var/www/swift. Then when you require the library in your application, you can:

require_once '/var/www/swift/lib/swift_required.php';

Then you can start using the library. For more information, check out the docs for a quick reference at: http://swiftmailer.org/docs/messages.html

0

精彩评论

暂无评论...
验证码 换一张
取 消