Zend Email and attachments

Asked by:
DrDonut
Time:
2012-03-30 3:31 am
Category:
How To
Hits:
741
Hi,

I am porting php code from another provider, so I know that it has worked in the past. I am using Zend_Mail to send emails from my application, and it will work if I don't have an attachment. When I do attach a small file, the email doesn't error and doesn't send. Here is my code to add the attachment:

$at = new Zend_Mime_Part($content);
$at->type = $mime_type;
$at->disposition = Zend_Mime::DISPOSITION_INLINE;
$at->encoding = Zend_Mime::ENCODING_BASE64;
$at->filename = $file_name;
$mail->addAttachment($at);

Thanks,
Buzz

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Like this Question?

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.