开发者

how to send attachment by email [duplicate]

开发者 https://www.devze.com 2023-03-25 18:04 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Send email with attachments in PHP?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Send email with attachments in PHP?

I've many Joomla/Drupal sites running but I want to send a file attachment by email using php code on linux/unix command line, how can I do i开发者_Python百科t?

When I use mail function in my shared hosting account, it's not send any mails.


Are you having an issue sending any email, or just emails with attachments?

Some shared hosts aren't setup to be able to send email through PHP's built-in mail() function. In these cases, you'll need to explicitly connect to an SMTP server and send your mail that way. You should take a look into the mail PEAR package or other solutions for connecting to an SMTP server.

The specific server you connect to should be in your shared servers documentation. If not, you'll need to contact their support people to have them provide this. In fact, it's probably a good idea to look into their support system/forums to ensure that this is the actual cause of the issue, and not some other coding issue.

0

精彩评论

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