I am using https://github.com/kailoa/iphone-smtp code for sending mail via smtp server. I am able to send mail properly. But i have a requirement that when user has pressed a button the mail should not be send. Is there any way through which we can stop sending mail (if the request has already been made).
我使用https://github.com/kailoa/iphone-smtp代码通过smtp服务器发送邮件。我能够正确发送邮件。但我要求当用户按下按钮时不应发送邮件。我们有什么方法可以停止发送邮件(如果请求已经发出)。
Thanks in Advance.
提前致谢。
1 个解决方案
#1
3
I cant say im any familiar with this. You cant withdraw an email that has already been sent, that i am pretty sure of.
我不能说我对此很熟悉。您无法撤回已发送的电子邮件,我非常确定。
But what you can do, is setup some timed delay. i.e of 10 seconds before its shipped to the SMTP handler.
但你可以做的是设置一些时间延迟。即发送到SMTP处理程序之前10秒。
Flow: 1) Write the Email 2) Press send 3) Put in some sort of QUEUE (Array of message objects?) 4) Setup some timer that would trigger after 10 seconds to loop trough the array and send the messages.
流程:1)写电子邮件2)按发送3)输入某种队列(消息对象数组?)4)设置一些定时器,在10秒后触发通过阵列循环并发送消息。
If the user presses "Cancel" or "Delete" or something on the message before the timer is running. then delete the object from the array. and it wont send the message :)
如果用户在计时器运行之前按下“取消”或“删除”等消息。然后从数组中删除该对象。它不会发送消息:)
Hope this helps!
希望这可以帮助!
#1
3
I cant say im any familiar with this. You cant withdraw an email that has already been sent, that i am pretty sure of.
我不能说我对此很熟悉。您无法撤回已发送的电子邮件,我非常确定。
But what you can do, is setup some timed delay. i.e of 10 seconds before its shipped to the SMTP handler.
但你可以做的是设置一些时间延迟。即发送到SMTP处理程序之前10秒。
Flow: 1) Write the Email 2) Press send 3) Put in some sort of QUEUE (Array of message objects?) 4) Setup some timer that would trigger after 10 seconds to loop trough the array and send the messages.
流程:1)写电子邮件2)按发送3)输入某种队列(消息对象数组?)4)设置一些定时器,在10秒后触发通过阵列循环并发送消息。
If the user presses "Cancel" or "Delete" or something on the message before the timer is running. then delete the object from the array. and it wont send the message :)
如果用户在计时器运行之前按下“取消”或“删除”等消息。然后从数组中删除该对象。它不会发送消息:)
Hope this helps!
希望这可以帮助!