我一直在尝试使用SKPSMTPMessage library.Although,我还没有成功,请任何人让我知道我如何不需要硬编码的邮件发件人。我所看到的是,为了在SKPSMTPMessage中发送邮件,我们需要对发件人进行硬编码。如下所示:
SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
testMsg.fromEmail = @"youremail@email.com";但我不想要特定的发送者,而应该是来自设备的发送者。类似于我们在mfmessagecomposeviewcontroller中的一个。
我还可以将发件人包括在“抄送/密件抄送”部分,以便发件人也能收到他/她发送的邮件的副本。
谢谢。
发布于 2013-10-03 15:29:05
你可以做到这一点,以下是基本步骤:
- Create a screen/view which will collect all these informations (FromEmail, ToEmail, CC, BCC, SMTP Address, etc.)
- Save those details in your code.
- Use those details while sending out mail.因此,它会让你的代码看起来像这样:
SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
testMsg.fromEmail = fromEmailTextField.text;希望这能有所帮助。
https://stackoverflow.com/questions/19153143
复制相似问题