Zend Email and attachments

Asked by:
DrDonut / 8 Points
Time:
2012-03-29 11:31 pm EST
Category:
How To
Hits:
1,055
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?

News / Announcements

Update to SSL Certificates - Certificate Warnings
1969-12-31 11:00 am EST
Hits: 694

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!

Help 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.