•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,515 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,766 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 839 | Replies: 3 | Solved
![]() |
<?php $smtp_server = "mail.webhostasp.com"; $port = 25; $mydomain = "domain.com"; $username = "info@domain.com"; $password = "password"; $sender = "info@domain.com"; $recipient = "no-one@domain.com"; $subject = "Test"; $content = "Bla bla bla"; // SMTP connection $handle = fsockopen($smtp_server, $port); fputs($handle, "EHLO " . $mydomain . "\r\n"); // SMTP authorization fputs($handle, "AUTH LOGIN\r\n"); fputs($handle, base64_encode($username)."\r\n"); fputs($handle, base64_encode($password)."\r\n"); // Send out the e-mail fputs($handle, "MAIL FROM:<" . $sender . ">\r\n"); fputs($handle, "RCPT TO:<" . $recipient . ">\r\n"); fputs($handle, "DATA\r\n"); fputs($handle, "To: " . $recipient . "\n"); fputs($handle, "Subject: " . $subject . "\n\n"); fputs($handle, $content . "\r\n"); fputs($handle, ".\r\n"); // Close connection to SMTP server fputs($handle, "QUIT\r\n"); ?>
this code works only once, then dos NOT work anymore on my server.
anyone has idea??
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation:
Rep Power: 3
Solved Threads: 72
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- mail function (PHP)
- mail function issue in php (PHP)
- Problems with PHP mail function. (PHP)
- Ask Function problem?thanks (C)
- php.ini file not being read (PHP)
- Stuck on Mail() Function (PHP)
Other Threads in the PHP Forum
- Previous Thread: showing strings in random positions...?
- Next Thread: upgrading to php5


Linear Mode