SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict aniltc's Avatar
    Join Date
    Nov 2006
    Location
    INDIA
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question mail & fsockopen

    hi


    how can we send a mail using fsockopen?


    cheers
    atc

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Umm i am not sure what is the relation between those two functions and in which case you want to do what with those functions in relation. Does the function fsockopen() send the emails?

    Please be more descriptive. Maybe i am not unknown about it though.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  3. #3
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aniltc
    hi


    how can we send a mail using fsockopen?


    cheers
    atc
    Yes You can. It involves creating a socket connection with your SMTP server . Actually, it's a more efficient method if you need to send large number of emails in a loop. Each call to built-in mail() function requires a separate SMTP connection, which obviously is not an efficient option.

  4. #4
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Instead of writing your own fsockopen implementation(this is a bit complex as you have to manually use a number of cryptic headers) , use existing libraries such as Swiftmailer or PEAR:Mail

  5. #5
    SitePoint Wizard bronze trophy devbanana's Avatar
    Join Date
    Apr 2006
    Location
    Pennsylvania
    Posts
    1,736
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In case you're honestly interested, you'd just have to learn the SMTP protocol. Fun for those of us who take enjoyment in such painful and low-level processes, but otherwise, unnecessary as there are, as mentioned, many third party libraries in existence already who wrap all of this for you.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •