gpt4 book ai didi

ios - SKPSMTPMessage中没有硬编码的“fromEmail”(发件人)

转载 作者:行者123 更新时间:2023-12-01 16:47:05 28 4
gpt4 key购买 nike

我一直在尝试使用SKPSMTPMessage库。虽然我还没有成功,但是会有人让我知道我不需要对邮件的发件人进行硬编码。
我所看到的是,我们需要对发件人进行硬编码,以便在SKPSMTPMessage中发送邮件。像这样的东西:

    SKPSMTPMessage *testMsg = [[SKPSMTPMessage alloc] init];
testMsg.fromEmail = @"youremail@email.com";

但是我不希望有特定的发件人,而应该是设备上的发件人。
与mfmessagecomposeviewcontroller中的类似。

我也可以将发件人包含在“CC / BCC”部分中,以便发件人也可以接收他/她已发送的邮件副本。

谢谢。

最佳答案

您可以实现这一点,这是基本步骤:

 - 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;

希望这可以帮助。

关于ios - SKPSMTPMessage中没有硬编码的“fromEmail”(发件人),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19153143/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com