SlideShare a Scribd company logo
1 of 3
Collecting Contacts using cardmagic-contacts plug-in in Rails 2.3.8


cardmagic-contacts is a rails plug-in which provides an interface to fetch contact list
information from various email providers including Hotmail, AOL, Gmail, Plaxo, Yahoo and many
more.
This example narrates how to extract contact list using Rails 2.3.8 and cardmagic-contacts plug-in

Step#1

Download the plug-in by running the command below to store the plug-in in the folder
“vendor/plug-ins”

Windows


  ruby script/plugin install git://github.com/cardmagic/contacts


Linux


  ruby script/plugin http://github.com/cardmagic/contacts


Step#2

Write down the following code on the top of the controller class


  require 'contacts'


Step#3

Pass the required gmail/yahoo/hotmail/AOL login & password from view


  <div>

     <div style="margin-left:25px;" >Invite <img
src="../images/yahoo.JPG">Yahoo

          Friends </div>

    <div style="margin-left:25px;">Yahoo Email: <input type="text"
name="email"

       class="txt"   id="yahoo_email_id"></div>
    <div style="margin-left:25px;">Password: &nbsp;&nbsp;<input
type="password"
name="email" class="txt"             id="yahoo_pwd_id"></div>

      <div style="margin-left:122px;margin-top:20px;"><input type="button"

      value="Login" name="btn_submit" id="btn_submit" class="searchbutton"
></div>

    </div>


Step#4

Create an action to fetch the list of contacts for a specific email id


def grab_contacts

  #Grab gmail contacts

  @gmail_contacts=Contacts::Gmail.new(login, password).contacts
     #or
  @gmail_contacts=Contacts.new(:gmail, login, password).contacts

  #Grab yahoo contacts

  @yahoo_contacts = Contacts::Yahoo.new(login, password).contacts
     #or
  @yahoo_contacts = Contacts.new(:yahoo, login, password).contacts

  #Grab hotmail contacts

  @hotmail_contacts =Contacts::Hotmail.new(login, password).contacts
     #or
  @hotmail_contacts = Contacts.new(:hotmail, login, password).contacts

end


Step#5

Here is also alternate method to get the contacts by providing email_id and password


 any_mail = Contacts.guess(login, password).contacts


The “Contacts.guess” method will automatically concatenate the entire address book from each of
the successful logins. If the login and password is working with multiple email accounts then it will
grab the contacts from all accounts.
Step#6

Display the friends list in your view page
<table>
      <th>
          <td >Friends Name</td>
           <td >Friends Email</td>
      </th>
        <tr>
           <% @gmail_contacts.each do |contact| %>
              <td><%=contact[0]%></td>
              <td><%=contact[1]%></td>
           <% end %>
        </tr>
 </table>

More Related Content

Viewers also liked

Telecoms canto mba#2 b
Telecoms canto mba#2 bTelecoms canto mba#2 b
Telecoms canto mba#2 bpearl studio
 
Protesis dental power
Protesis dental powerProtesis dental power
Protesis dental power5221490
 
Las redes sociales como herramienta para trabajar 2
Las redes sociales como herramienta para trabajar 2Las redes sociales como herramienta para trabajar 2
Las redes sociales como herramienta para trabajar 2OMEP Murcia
 
Pharmacovigilance 2010
Pharmacovigilance 2010Pharmacovigilance 2010
Pharmacovigilance 2010Naveen Raju
 
Buying Social Media Monitoring Software For Fortune 1000
Buying Social Media Monitoring Software For Fortune 1000Buying Social Media Monitoring Software For Fortune 1000
Buying Social Media Monitoring Software For Fortune 1000The @Steveology Group
 
Trabajo definitivo
Trabajo definitivoTrabajo definitivo
Trabajo definitivolauri83
 
India Salary Guide 2013
India Salary Guide 2013 India Salary Guide 2013
India Salary Guide 2013 Kelly Services
 
Embarcaciones Deportivas
Embarcaciones DeportivasEmbarcaciones Deportivas
Embarcaciones Deportivasycoyco
 
Luminate Online Best Practices for Beginners
Luminate Online Best Practices for BeginnersLuminate Online Best Practices for Beginners
Luminate Online Best Practices for BeginnersBlackbaud
 
SCSM Asset Management - the most powerful ITAM product on the market
SCSM Asset Management - the most powerful ITAM product on the marketSCSM Asset Management - the most powerful ITAM product on the market
SCSM Asset Management - the most powerful ITAM product on the marketCased Dimensions
 
Music discovery: What, why, who, when, where?
Music discovery: What, why, who, when, where?Music discovery: What, why, who, when, where?
Music discovery: What, why, who, when, where?Julie Knibbe
 

Viewers also liked (20)

Telecoms canto mba#2 b
Telecoms canto mba#2 bTelecoms canto mba#2 b
Telecoms canto mba#2 b
 
Protesis dental power
Protesis dental powerProtesis dental power
Protesis dental power
 
Cap6 carmen mª cruz
Cap6 carmen mª cruzCap6 carmen mª cruz
Cap6 carmen mª cruz
 
Jurisp completo
Jurisp completoJurisp completo
Jurisp completo
 
Utedlt Campillo De Arenas. Emprendiduría
Utedlt Campillo De Arenas. EmprendiduríaUtedlt Campillo De Arenas. Emprendiduría
Utedlt Campillo De Arenas. Emprendiduría
 
Ruta de la Tapa Torrevieja 2011
Ruta de la Tapa Torrevieja 2011Ruta de la Tapa Torrevieja 2011
Ruta de la Tapa Torrevieja 2011
 
Las redes sociales como herramienta para trabajar 2
Las redes sociales como herramienta para trabajar 2Las redes sociales como herramienta para trabajar 2
Las redes sociales como herramienta para trabajar 2
 
Animal love
Animal loveAnimal love
Animal love
 
Creo en ti
Creo en ti Creo en ti
Creo en ti
 
Pharmacovigilance 2010
Pharmacovigilance 2010Pharmacovigilance 2010
Pharmacovigilance 2010
 
Cirrculam Vitae
Cirrculam VitaeCirrculam Vitae
Cirrculam Vitae
 
Buying Social Media Monitoring Software For Fortune 1000
Buying Social Media Monitoring Software For Fortune 1000Buying Social Media Monitoring Software For Fortune 1000
Buying Social Media Monitoring Software For Fortune 1000
 
Trabajo definitivo
Trabajo definitivoTrabajo definitivo
Trabajo definitivo
 
India Salary Guide 2013
India Salary Guide 2013 India Salary Guide 2013
India Salary Guide 2013
 
Embarcaciones Deportivas
Embarcaciones DeportivasEmbarcaciones Deportivas
Embarcaciones Deportivas
 
Luminate Online Best Practices for Beginners
Luminate Online Best Practices for BeginnersLuminate Online Best Practices for Beginners
Luminate Online Best Practices for Beginners
 
SCSM Asset Management - the most powerful ITAM product on the market
SCSM Asset Management - the most powerful ITAM product on the marketSCSM Asset Management - the most powerful ITAM product on the market
SCSM Asset Management - the most powerful ITAM product on the market
 
Policy Creation
Policy CreationPolicy Creation
Policy Creation
 
La kenosis Trinitaria en Sergey BUlgakov
La kenosis Trinitaria en Sergey BUlgakovLa kenosis Trinitaria en Sergey BUlgakov
La kenosis Trinitaria en Sergey BUlgakov
 
Music discovery: What, why, who, when, where?
Music discovery: What, why, who, when, where?Music discovery: What, why, who, when, where?
Music discovery: What, why, who, when, where?
 

Similar to Collecting contacts using cardmagic contacts plug-in in rails 2.3.8

Creating simple php contact form
Creating simple php contact formCreating simple php contact form
Creating simple php contact formDaniel Downs
 
The Django Book - Chapter 7 forms
The Django Book - Chapter 7 formsThe Django Book - Chapter 7 forms
The Django Book - Chapter 7 formsVincent Chien
 
Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2RORLAB
 
HTML::FormFu talk for Sydney PM
HTML::FormFu talk for Sydney PMHTML::FormFu talk for Sydney PM
HTML::FormFu talk for Sydney PMDean Hamstead
 
GCSECS-DefensiveDesign.pptx
GCSECS-DefensiveDesign.pptxGCSECS-DefensiveDesign.pptx
GCSECS-DefensiveDesign.pptxazida3
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsJohn Brunswick
 
Gem christmas calendar
Gem christmas calendarGem christmas calendar
Gem christmas calendarerichsen
 
12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Indexwebhostingguy
 
How not to suck at Cyber Security
How not to suck at Cyber SecurityHow not to suck at Cyber Security
How not to suck at Cyber SecurityChris Watts
 

Similar to Collecting contacts using cardmagic contacts plug-in in rails 2.3.8 (20)

Creating simple php contact form
Creating simple php contact formCreating simple php contact form
Creating simple php contact form
 
The Django Book - Chapter 7 forms
The Django Book - Chapter 7 formsThe Django Book - Chapter 7 forms
The Django Book - Chapter 7 forms
 
Beyond MVC
Beyond MVCBeyond MVC
Beyond MVC
 
Create Components in TomatoCMS
Create Components in TomatoCMSCreate Components in TomatoCMS
Create Components in TomatoCMS
 
Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2Action View Form Helpers - 1, Season 2
Action View Form Helpers - 1, Season 2
 
HTML::FormFu talk for Sydney PM
HTML::FormFu talk for Sydney PMHTML::FormFu talk for Sydney PM
HTML::FormFu talk for Sydney PM
 
Handout7 html forms
Handout7 html formsHandout7 html forms
Handout7 html forms
 
GCSECS-DefensiveDesign.pptx
GCSECS-DefensiveDesign.pptxGCSECS-DefensiveDesign.pptx
GCSECS-DefensiveDesign.pptx
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
Synapse india basic php development part 2
Synapse india basic php development part 2Synapse india basic php development part 2
Synapse india basic php development part 2
 
Gem christmas calendar
Gem christmas calendarGem christmas calendar
Gem christmas calendar
 
12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index
 
Security.ppt
Security.pptSecurity.ppt
Security.ppt
 
Riding Rails 4
Riding Rails 4Riding Rails 4
Riding Rails 4
 
WIT lab programs.docx
WIT lab programs.docxWIT lab programs.docx
WIT lab programs.docx
 
Html forms
Html formsHtml forms
Html forms
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
How not to suck at Cyber Security
How not to suck at Cyber SecurityHow not to suck at Cyber Security
How not to suck at Cyber Security
 

More from Andolasoft Inc

Essential Functionalities Your Real Estate Web App Must Have.pdf
Essential Functionalities Your Real Estate Web App Must Have.pdfEssential Functionalities Your Real Estate Web App Must Have.pdf
Essential Functionalities Your Real Estate Web App Must Have.pdfAndolasoft Inc
 
A Complete Guide to Developing Healthcare App
A Complete Guide to Developing Healthcare AppA Complete Guide to Developing Healthcare App
A Complete Guide to Developing Healthcare AppAndolasoft Inc
 
Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024Andolasoft Inc
 
A Complete Guide to Real Estate Website Development
A Complete Guide to Real Estate Website DevelopmentA Complete Guide to Real Estate Website Development
A Complete Guide to Real Estate Website DevelopmentAndolasoft Inc
 
How to Build Cross-Platform Mobile Apps Using Python
How to Build Cross-Platform Mobile Apps Using PythonHow to Build Cross-Platform Mobile Apps Using Python
How to Build Cross-Platform Mobile Apps Using PythonAndolasoft Inc
 
Impact of AI on Modern Mobile App Development
Impact of AI on Modern Mobile App DevelopmentImpact of AI on Modern Mobile App Development
Impact of AI on Modern Mobile App DevelopmentAndolasoft Inc
 
How to Optimize the SEO of Shopify Stores
 How to Optimize the SEO of Shopify Stores How to Optimize the SEO of Shopify Stores
How to Optimize the SEO of Shopify StoresAndolasoft Inc
 
14 Tips On How To Improve Android App Performance
14 Tips On How To Improve Android App Performance14 Tips On How To Improve Android App Performance
14 Tips On How To Improve Android App PerformanceAndolasoft Inc
 
The Ultimate Guide to Setting Up Your WooCommerce Store
The Ultimate Guide to Setting Up Your WooCommerce StoreThe Ultimate Guide to Setting Up Your WooCommerce Store
The Ultimate Guide to Setting Up Your WooCommerce StoreAndolasoft Inc
 
Ranking The Best PHP Development Companies in the World
Ranking The Best PHP Development Companies in the WorldRanking The Best PHP Development Companies in the World
Ranking The Best PHP Development Companies in the WorldAndolasoft Inc
 
Top 8 WordPress Design and Development Trends of 2023
Top 8 WordPress Design and Development Trends of 2023Top 8 WordPress Design and Development Trends of 2023
Top 8 WordPress Design and Development Trends of 2023Andolasoft Inc
 
List of 10 Best WordPress Development Companies
List of 10 Best WordPress Development CompaniesList of 10 Best WordPress Development Companies
List of 10 Best WordPress Development CompaniesAndolasoft Inc
 
WooCommerce vs Shopify: Which is Better For Your Online Store
WooCommerce vs Shopify: Which is Better For Your Online StoreWooCommerce vs Shopify: Which is Better For Your Online Store
WooCommerce vs Shopify: Which is Better For Your Online StoreAndolasoft Inc
 
Why Choose WooCommerce For Your eCommerce Store
Why Choose WooCommerce For Your eCommerce StoreWhy Choose WooCommerce For Your eCommerce Store
Why Choose WooCommerce For Your eCommerce StoreAndolasoft Inc
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and ArchitectureAndolasoft Inc
 
Service Oriented Architecture in NodeJS
Service Oriented Architecture in NodeJSService Oriented Architecture in NodeJS
Service Oriented Architecture in NodeJSAndolasoft Inc
 
Top Features And Updates Of Angular 13 You Must Know
Top Features And Updates Of Angular 13 You Must KnowTop Features And Updates Of Angular 13 You Must Know
Top Features And Updates Of Angular 13 You Must KnowAndolasoft Inc
 
How To Organize And Structure Your SASS Code
How To Organize And Structure Your SASS CodeHow To Organize And Structure Your SASS Code
How To Organize And Structure Your SASS CodeAndolasoft Inc
 
Why Businesses Need Open Source Software
Why Businesses Need Open Source Software Why Businesses Need Open Source Software
Why Businesses Need Open Source Software Andolasoft Inc
 
What is Closure and Its Uses in PHP
 What is Closure and Its Uses in PHP What is Closure and Its Uses in PHP
What is Closure and Its Uses in PHPAndolasoft Inc
 

More from Andolasoft Inc (20)

Essential Functionalities Your Real Estate Web App Must Have.pdf
Essential Functionalities Your Real Estate Web App Must Have.pdfEssential Functionalities Your Real Estate Web App Must Have.pdf
Essential Functionalities Your Real Estate Web App Must Have.pdf
 
A Complete Guide to Developing Healthcare App
A Complete Guide to Developing Healthcare AppA Complete Guide to Developing Healthcare App
A Complete Guide to Developing Healthcare App
 
Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024Game-Changing Power of React Native for Businesses in 2024
Game-Changing Power of React Native for Businesses in 2024
 
A Complete Guide to Real Estate Website Development
A Complete Guide to Real Estate Website DevelopmentA Complete Guide to Real Estate Website Development
A Complete Guide to Real Estate Website Development
 
How to Build Cross-Platform Mobile Apps Using Python
How to Build Cross-Platform Mobile Apps Using PythonHow to Build Cross-Platform Mobile Apps Using Python
How to Build Cross-Platform Mobile Apps Using Python
 
Impact of AI on Modern Mobile App Development
Impact of AI on Modern Mobile App DevelopmentImpact of AI on Modern Mobile App Development
Impact of AI on Modern Mobile App Development
 
How to Optimize the SEO of Shopify Stores
 How to Optimize the SEO of Shopify Stores How to Optimize the SEO of Shopify Stores
How to Optimize the SEO of Shopify Stores
 
14 Tips On How To Improve Android App Performance
14 Tips On How To Improve Android App Performance14 Tips On How To Improve Android App Performance
14 Tips On How To Improve Android App Performance
 
The Ultimate Guide to Setting Up Your WooCommerce Store
The Ultimate Guide to Setting Up Your WooCommerce StoreThe Ultimate Guide to Setting Up Your WooCommerce Store
The Ultimate Guide to Setting Up Your WooCommerce Store
 
Ranking The Best PHP Development Companies in the World
Ranking The Best PHP Development Companies in the WorldRanking The Best PHP Development Companies in the World
Ranking The Best PHP Development Companies in the World
 
Top 8 WordPress Design and Development Trends of 2023
Top 8 WordPress Design and Development Trends of 2023Top 8 WordPress Design and Development Trends of 2023
Top 8 WordPress Design and Development Trends of 2023
 
List of 10 Best WordPress Development Companies
List of 10 Best WordPress Development CompaniesList of 10 Best WordPress Development Companies
List of 10 Best WordPress Development Companies
 
WooCommerce vs Shopify: Which is Better For Your Online Store
WooCommerce vs Shopify: Which is Better For Your Online StoreWooCommerce vs Shopify: Which is Better For Your Online Store
WooCommerce vs Shopify: Which is Better For Your Online Store
 
Why Choose WooCommerce For Your eCommerce Store
Why Choose WooCommerce For Your eCommerce StoreWhy Choose WooCommerce For Your eCommerce Store
Why Choose WooCommerce For Your eCommerce Store
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
 
Service Oriented Architecture in NodeJS
Service Oriented Architecture in NodeJSService Oriented Architecture in NodeJS
Service Oriented Architecture in NodeJS
 
Top Features And Updates Of Angular 13 You Must Know
Top Features And Updates Of Angular 13 You Must KnowTop Features And Updates Of Angular 13 You Must Know
Top Features And Updates Of Angular 13 You Must Know
 
How To Organize And Structure Your SASS Code
How To Organize And Structure Your SASS CodeHow To Organize And Structure Your SASS Code
How To Organize And Structure Your SASS Code
 
Why Businesses Need Open Source Software
Why Businesses Need Open Source Software Why Businesses Need Open Source Software
Why Businesses Need Open Source Software
 
What is Closure and Its Uses in PHP
 What is Closure and Its Uses in PHP What is Closure and Its Uses in PHP
What is Closure and Its Uses in PHP
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Collecting contacts using cardmagic contacts plug-in in rails 2.3.8

  • 1. Collecting Contacts using cardmagic-contacts plug-in in Rails 2.3.8 cardmagic-contacts is a rails plug-in which provides an interface to fetch contact list information from various email providers including Hotmail, AOL, Gmail, Plaxo, Yahoo and many more. This example narrates how to extract contact list using Rails 2.3.8 and cardmagic-contacts plug-in Step#1 Download the plug-in by running the command below to store the plug-in in the folder “vendor/plug-ins” Windows ruby script/plugin install git://github.com/cardmagic/contacts Linux ruby script/plugin http://github.com/cardmagic/contacts Step#2 Write down the following code on the top of the controller class require 'contacts' Step#3 Pass the required gmail/yahoo/hotmail/AOL login & password from view <div> <div style="margin-left:25px;" >Invite <img src="../images/yahoo.JPG">Yahoo Friends </div> <div style="margin-left:25px;">Yahoo Email: <input type="text" name="email" class="txt" id="yahoo_email_id"></div> <div style="margin-left:25px;">Password: &nbsp;&nbsp;<input type="password"
  • 2. name="email" class="txt" id="yahoo_pwd_id"></div> <div style="margin-left:122px;margin-top:20px;"><input type="button" value="Login" name="btn_submit" id="btn_submit" class="searchbutton" ></div> </div> Step#4 Create an action to fetch the list of contacts for a specific email id def grab_contacts #Grab gmail contacts @gmail_contacts=Contacts::Gmail.new(login, password).contacts #or @gmail_contacts=Contacts.new(:gmail, login, password).contacts #Grab yahoo contacts @yahoo_contacts = Contacts::Yahoo.new(login, password).contacts #or @yahoo_contacts = Contacts.new(:yahoo, login, password).contacts #Grab hotmail contacts @hotmail_contacts =Contacts::Hotmail.new(login, password).contacts #or @hotmail_contacts = Contacts.new(:hotmail, login, password).contacts end Step#5 Here is also alternate method to get the contacts by providing email_id and password any_mail = Contacts.guess(login, password).contacts The “Contacts.guess” method will automatically concatenate the entire address book from each of the successful logins. If the login and password is working with multiple email accounts then it will grab the contacts from all accounts. Step#6 Display the friends list in your view page
  • 3. <table> <th> <td >Friends Name</td> <td >Friends Email</td> </th> <tr> <% @gmail_contacts.each do |contact| %> <td><%=contact[0]%></td> <td><%=contact[1]%></td> <% end %> </tr> </table>