WebTech
WebTech

Reputation: 21

How to send attachments using Swift mailer library?

Please let me know if any eg. how to send attachments(doc/image etc.) using Swift library?

Upvotes: 1

Views: 1620

Answers (1)

Inoryy
Inoryy

Reputation: 8425

$message = Swift_Message::newInstance('Subject here', 'Body here');

$message->attach(Swift_Attachment::fromPath('/path/to/file'));

Upvotes: 5

Related Questions