我想在“mailto”标签上换行。这是我在 C# 中的代码
mailto:aaa@gmail.com?subject=My subject&body=I want break in here.%0D%0A Line2 content
我正在使用“%0D%0A”来换行。在我的浏览器中,此代码有效。但在 iPad 的电子邮件应用程序中,它不能断线。请帮帮我
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 标签的电子邮件的整个正文......
如果你的意思是 Objective C 和 UsingMFMailComposeViewController
你可以使用这样的东西
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];
- (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];
}