Open GoogleCodeExporter opened 8 years ago
For the content disposition key, try changing "attachment" to "inline".
Original comment by c.justin...@gmail.com
on 16 Apr 2009 at 4:58
Thanks Justin. Making it inline was not sufficient. I had achieved it in this
way:
// part1 - text part, MIME type text/html, HTML <img> tag uses
src="cid:my_image",
this cid value 'my_image' is being referred in SMTP Content-ID header
NSDictionary *plainPart = [NSDictionary
dictionaryWithObjectsAndKeys:@"text/html",kSKPSMTPPartContentTypeKey,@"This is
a tést
messåge.<img src=\"cid:my_image\">"
,kSKPSMTPPartMessageKey,@"8bit",kSKPSMTPPartContentTransferEncodingKey,nil];
// part2 - image part, MIME type image/jpeg, Content-Disposition is 'inline'.
Content-Transfer-Encoding is 'base64'
NSDictionary *imagePart = [NSDictionary
dictionaryWithObjectsAndKeys:@"image/jpeg",kSKPSMTPPartContentTypeKey,@"inline",
kSKPSMTPPartContentDispositionKey,[imageData
encodeBase64ForData],kSKPSMTPPartMessageKey,@"base64",kSKPSMTPPartContentTransfe
rEncodingKey,@"<my_image>",kSKPSMTPPartContentIdKey,nil];
In sendParts method of SKPSMTPMessage.m, this was done:
[message appendString:@"Content-Type: multipart/related;
boundary=SKPSMTPMessage--Separator--Delimiter\r\n"];
for (NSDictionary *part in parts)
{
...
if ([part objectForKey:kSKPSMTPPartContentIdKey])
{
[message appendFormat:@"Content-ID: %@\r\n", [part
objectForKey:kSKPSMTPPartContentIdKey]];
}
...
}
Original comment by raktimd
on 17 Apr 2009 at 6:00
how to I take photo and send via mail ??
Original comment by ahmeda...@gmail.com
on 21 Nov 2012 at 10:23
Original issue reported on code.google.com by
raktimd
on 14 Apr 2009 at 7:04