我想在“mailto”标签上打破一行。这是我在C#中的代码
mailto:aaa@gmail.com?subject=My subject&body=I want break in here.%0D%0A Line2 content
我正在使用“%0D%0A”来破线。在我的浏览器中,此代码已经运行。但在iPad的电子邮件应用中,它无法突破。帮帮我PLZ
答案 0 :(得分:0)
如果您的意思是目标C并使用MFMailComposeViewController
你可以使用这样的东西
NSString *emailBody = @"<HTML><BODY><B>It is raining in sunny California!</B><br>this is my second line</BODY></HTML>";
[picker setMessageBody:emailBody isHTML:YES];
答案 1 :(得分:0)
- (void) sendEventInEmail
{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
NSArray *toRecipent=[[NSArray alloc]initWithObjects:@"aaa@gmail.com", nil];
[picker setToRecipients:toRecipents];
NSString *emailSubject = @"My subject";
[picker setSubject:emailSubject];
// Fill out the email body text
NSString *emailBody = @"1st line<br />2nd line<br />3rd line<br />and so on..."
[picker setMessageBody:emailBody isHTML:YES];
picker.navigationBar.barStyle = UIBarStyleBlack;
[self presentModalViewController:picker animated:YES];
[picker release];
}
答案 2 :(得分:0)
NSMutableString *emailBody = [NSString stringWithFormat:@"<html> <head><h3>User Detail </h3></head> <body> <table border=0> <tr><td> First Name:<td><font color=color:red> %@ </font></td> </td></tr> <tr><td>Last Name: <td><font color=color:red> %@ </font></td></td></tr> <tr><td>User Name: <td><font color=color:red> %@ </font></td></td></tr> <tr><td> Password: <td><font color=color:red>%@</font></td> </td></tr> <tr><td> Birth Date: <td><font color=color:red>%@</font></td> </td></tr> <tr><td> Location: <td><font color=color:red>%@</font></td> </td></tr> <tr><td>Image :</td></tr></table></body></html> ",msgDataFName,msgDataLName,msgDataUserName,msgDataPswd,msgDataBdate,msgDataLocation];
这是使用html标签的整个电子邮件......