日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

iphone发送邮件html,iPhone使用smtp服务器发送电子邮件?

發布時間:2025/3/20 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 iphone发送邮件html,iPhone使用smtp服务器发送电子邮件? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在我的應用程序中,我能夠使用smtp服務器發送電子郵件,因為我輸入了正確的電子郵件ID和密碼.

但當我輸入我的Gmail或雅虎帳戶詳細信息時,我無法發送郵件.

因為我設置了relayHost = @“smtp.gmail.com”;然后我也無法發送郵件.

請幫我解決這個問題.

以下是我的代碼:

-(void)sendEMAIL{

SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];

testMsg.fromEmail = str_uname;

NSLog(@"str_Uname=%@",testMsg.fromEmail);

testMsg.toEmail = str_info;

NSLog(@"autoemail=%@",testMsg.toEmail);

testMsg.relayHost = @"smtp.gmail.com";

testMsg.requiresAuth = YES;

testMsg.login = str_uname;

NSLog(@"autoelogin=%@",testMsg.login);

testMsg.pass = str_password;

NSLog(@"autopass=%@",testMsg.pass);

testMsg.subject = @"Schedule Sms And Email";

testMsg.wantsSecure = YES;

NSString *sendmsg=[[NSString alloc]initWithFormat:@"%@",str_info2];

NSLog(@"automsg=%@",sendmsg);

testMsg.delegate = self;

NSDictionary *plainPart = [NSDictionary dictionaryWithObjectsAndKeys:@"text/plain",kSKPSMTPPartContentTypeKey,

sendmsg, kSKPSMTPPartMessageKey,@"8bit",kSKPSMTPPartContentTransferEncodingKey,nil];

testMsg.parts = [NSArray arrayWithObjects:plainPart,nil];

[testMsg send];

}

-(void)messageSent:(SKPSMTPMessage *)message{

[message release];

}

-(void)messageFailed:(SKPSMTPMessage *)message error:(NSError *)error{

[message release];

}

總結

以上是生活随笔為你收集整理的iphone发送邮件html,iPhone使用smtp服务器发送电子邮件?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。