Jump to content

andersonsm1

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by andersonsm1

  1. I found an error in my script which prevented me from sending mail through TCH: Original Code: >$smtp->datasend("To: target\@targetdomain.com"); $smtp->datasend("From: user\@****"); $smtp->datasend("Subject: Test from Perl\n"); Each header must be followed by a newline. Correct Code: >$smtp->datasend("To: target\@targetdomain.com\n"); $smtp->datasend("From: user\@****\n"); $smtp->datasend("Subject: Test from Perl\n"); You can also do this in the From header >$smtp->datasend("From: \"Your Name\" <user\@****>\n"); to display your name instead of your email address. Headers followed by newlines is a must for TCH but I was able to send email (albeit a little jumbled...) through my ISP's SMTP server. This script makes use of Net::SMTP which has all sorts of other features like CC, BCC, and receipt request.
  2. Raul, Thanks for the quick reply! I've been a very happy TCH customer for about a year and a half now. Your point regarding using Sendmail is well taken---I am using this script on Linux and I was looking for a quick solution (and I didn't want to learn or have to worry about Sendmail). I will try to log into my POP account first and them send mail. Thanks for your help and I'll let you know how it goes.
  3. Greetings, I've been working on a Perl script to send email from my home computer to an email account using my domain's SMTP server. The script is: >#!/usr/bin/perl -w use Net::SMTP; use Net::SMTP::SSL; my $server_name = "mail.****"; $smtp = Net::SMTP::SSL->new($server_name, Timeout => 30, Debug =>1, Port=>465); $smtp->auth('username+****', 'password'); my $mail_from = "user\@****"; my $mail_to = "target\@targetdomain.com"; $smtp->mail( $mail_from ); $smtp->recipient( $mail_to ); $smtp->data(); $smtp->datasend("To: target\@targetdomain.com"); $smtp->datasend("From: user\@****"); $smtp->datasend("Subject: Test from Perl\n"); $smtp->datasend("\n"); $smtp->datasend("This is a test message from Perl.\n"); $smtp->dataend(); $smtp->quit(); When run, the following output is generated: ><<< 220-server29.totalchoicehosting.com ESMTP Exim 4.44 #1 Sun, 30 Jan 2005 11:17:24 -0600 <<< 220-We do not authorize the use of this system to transport unsolicited, <<< 220 and/or bulk e-mail. >>> EHLO localhost.localdomain <<< 250-server29.totalchoicehosting.com Hello localhost.localdomain [xx.xxx.xxx.xxx] <<< 250-SIZE 52428800 <<< 250-PIPELINING <<< 250-AUTH PLAIN LOGIN <<< 250 HELP >>> AUTH PLAIN c2NvdHQrc2NvdHRhbmRqdWxpZWFuZGVyc29uLmNvbQBzY290dCtzY290dGFuZGp1bGllYW5kZXJzb24uY29tA Z1enp5bnV0cw== <<< 235 Authentication succeeded >>> MAIL FROM:<user@****> <<< 250 OK >>> RCPT TO:<target@targetdomain.com> <<< 250 Accepted >>> DATA <<< 354 Enter message, ending with "." on a line by itself >>> To: target@targetdomain.com >>> From: user@**** >>> Subject: Test from Perl >>> This is a test message from Perl. >>> . <<< 550 Administrative prohibition >>> QUIT <<< 221 server29.totalchoicehosting.com closing connection Any ideas why exim is closing the connection? I appear to have authenticated properly with the system. Also, I can use SSL on port 465 and send email successfully using MS Outlook. Your help is appreciated---thanks!
  4. Thanks! This was just what I needed. Cheers, Scott
  5. Is it possible to view what Pear (http://pear.php.net) modules are installed? I was hoping to use the SOAP, HTTP_Request, Net_URL, and Net_DIME packages to access the Google API. Does anyone know of a good resource for installing these packages locally if they aren't available "server wide"? Thanks! Rock Sign Cheers, Scott
×
×
  • Create New...