Zend Email and attachments

Asked by:
DrDonut / 8 Points
Time:
2012-03-30 6:31 am EST
Category:
How To
Hits:
1,154
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

To ask this user for more information, please first login.

To submit an answer, please login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 757-416-6627 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.
}