iPhone4 iOS5 使用 UIViewController 创建邮件列表的最佳方法是什么?

发布于 2024-12-15 10:45:32 字数 291 浏览 3 评论 0原文

我正在尝试为我的应用程序的用户提供加入邮件列表以接收有关产品更新的新闻的机会。通过这种方式,我希望能够重新吸引一些可能在未来某个时候停止使用我的应用程序的用户。

我知道如何显示带有预定义电子邮件地址的电子邮件撰写表,但有些事情告诉我,必须有比要求用户向我发送电子邮件以加入列表更好的方法。

有人为 iPhone 做过类似的事情吗?我需要在我的网站上运行什么样的代码来捕获这些电子邮件并将它们自动添加到邮件列表中?我可以向我的页面添加一些 PHP 脚本,但对于 Web 编程和 PHP 而言,我完全是业余爱好者。

谢谢你!

I'm trying to offer the users of my app an opportunity to join a mailing list to receive news about the product updates. This way, I hope to re-capture some of the users who might've stopped using my app at some point in the future.

I know how to display an email composition sheet with a pre-defined email address, but something tells me that there has to be a better way than asking the user to send me an email to join the list.

Has anyone done something like that for iPhone? What kind of code would I need to run on my website to capture these emails and automatically add them to a mailing list? I can add some PHP scripts to my pages, but I'm a total amateur when it comes to web programming and PHP.

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

痕至 2024-12-22 10:45:32

我认为你应该使用 ASIHTTPRequest 库 - 它允许你使用 POST 运行非常简单的查询。你也可以使用 ios,但我发现 ASIHTTPRequest 更容易。

现在,您需要在服务器上有一个 php 脚本,例如(非常基本的东西):

store.php:

<?
$email = $_POST['email'];
// for now we send email to confir script work
mail($email, 'GREAT!', "YOU SIGNED FOR OUR NEWSLETTER, WE WILL SPAM YOU"); 
printf("OK"); // output we can read via ASIHTTP

// here should be be code for storing $email var in database / text file
?> 

所以现在您需要请求 http://www.myserver.com/store.php
有一些额外的 POST 参数,例如:

NSURL *url = [NSURL URLWithString:@"http://www.myserver.com/store.php"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
// email is variable name, we read it in php script
[request setPostValue:@"[email protected]" forKey:@"email"];  
[request startSynchronous];  // you should use async here

我最近测试了类似的解决方案,它有效。快乐编码

I think you should use ASIHTTPRequest library - it will allow you to run very simple queries using POST. You can use ios as well, but I found ASIHTTPRequest much easier.

Now, you need a php script on the server, sth like (very basic stuff):

store.php:

<?
$email = $_POST['email'];
// for now we send email to confir script work
mail($email, 'GREAT!', "YOU SIGNED FOR OUR NEWSLETTER, WE WILL SPAM YOU"); 
printf("OK"); // output we can read via ASIHTTP

// here should be be code for storing $email var in database / text file
?> 

so now you need to request http://www.myserver.com/store.php
with some extra POST arguments, sth like:

NSURL *url = [NSURL URLWithString:@"http://www.myserver.com/store.php"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
// email is variable name, we read it in php script
[request setPostValue:@"[email protected]" forKey:@"email"];  
[request startSynchronous];  // you should use async here

I've tested similar solution recently, it works. Happy coding

不知所踪 2024-12-22 10:45:32

我同意 Siegfried 的观点,但您也可以查看 MailChimp 以及 Objective-C API 包装器 ChimpKit。我建议这样做的唯一原因是您不必担心所有取消订阅/管理等。它实现起来非常简单,并且省去了您设置和编写 Web 端的麻烦。

I agree with Siegfried, but you could also look into MailChimp and there Objective-C API wrapper ChimpKit. The only reason I suggest this, is you don't have to worry about all the unsubscribe/management and such. It's simple enough to implement, and it saves you the headache of setting up and writing the web-side.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文