Sending a mail using gmail

This code is use for the sending a mail to another mail id  using gmail account for that you need to import the frame work which name is CFNetwork.framework.

For that you need to implement following code into your project.

1) Create new project and select view-based application.

2) Following code is copy/paste into your project header file like viewcontroller.h file

3) Implement following code into your .m file like  viewcontroller.m file

  • For that create the new method called “sendMessageInBack”
  • If message/mail transfer successfully then this method to call.
  • If message/mail transfer unsuccessfully then this method to call.
4) Following files copy/paste into your project.

neccesary_files

 

5) Run the application and insert the sender email address into text box.

Output

 

Grab the sample code from here.

Leave a Reply

Your email address will not be published. Required fields are marked *



*