I have come across a problem where pdf attachments are being filtered out by OUTLOOK.
If a user has setup a Signature to be included in their emails and I generate the email for them with a pdf attachment outlook will strip out the attachment. If they remove the signature then everything works fine and the attachment appears in outlook. I have tracked down several bulletins identifying this as a problem between Apple Mail clients and outlook and the solution is to always insert the attachment in the header or at the very end of the email. I cannot figure out how to do this using the standard mail code. Here is my snippet..
MFMailComposeViewController _mail; if (MFMailComposeViewController.CanSendMail){ _mail = new MFMailComposeViewController(); _mail.SetMessageBody ("Partsmaster Quote",false); t_curpage = 1; NSData imagedata = CreatePDF (); _mail.AddAttachmentData(imagedata,"application/pdf","Quote"+t_detail[0].OrderID.ToString() +".pdf"); _mail.Finished += Handle_mailFinished; this.PresentModalViewController (_mail,true); }else{ //Handle not being able to send email }
Any ideas?