|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
I'm trying to send html formatted email from my script. Script every time reports that email has been send successfully, just if I send it to web based email accounts (hotmail.com, myownemail.com...) it never arrives. Only if I send email to my address with which I'm using Microsoft Outlook it works fine.
Here is the code: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> open (MAIL, "|$mailprogram -t"); print MAIL "To: $FORM{'prima'}n"; print MAIL "From: $FORM{'salje'}n"; print MAIL "Subject: $FORM{'subjekt'}n"; print MAIL "Content-type: text/htmlnn"; print MAIL "<html><body><P>$FORM{'tekst'}</P>n"; print MAIL "<font size="2">___________________________________________<BR>n"; print MAIL "Email sent by <A HREF="http://www.upitnik.net</font><BR>n";" TARGET=_blank>www.upitnik.net</font><BR>n";</A> print MAIL "<font size="1">IP: $ENV{'REMOTE_ADDR'}, Time: $vrijeme CET</font></P></body></html>n"; close (MAIL); print "Content-type: text/htmlnn"; print "<B>Email sent !</B><P>"; print "To: $FORM{'prima'}<BR>"; print "From: $FORM{'salje'}<BR>"; [/code] |
|
#2
|
|||
|
|||
|
Your code looks fine to me.
>>Script every time reports that email has been send successfully How do you know if sendmail really sends emails successfully? You at least need to change this line to -> open (MAIL, "|$mailprogram -t") | | &error("Can't open $mailprogramn"); and add an error subroutine. |
|
#3
|
|||
|
|||
|
I have reduced code to this, and it still sends email only to my POP3 account (webmaster@upitnik.net), but email never arrives to any other address: (@hotmail.com, @mail.com, @dotcomemail.com, @myownemail.com)
$mailprogram = '/usr/lib/sendmail'; open (MAIL, "|$mailprogram -t") | | &dienice("Error in mail program.n"); print MAIL "To: $FORM{'prima'}n"; print MAIL "From: $FORM{'salje'}n"; print MAIL "Subject: $FORM{'subjekt'}nn"; print MAIL "Is it OK?n"; close (MAIL); print "Content-type: text/htmlnn"; print "<B>Email sent!</B><P>"; print "To: $FORM{'prima'}<BR>"; print "From: $FORM{'salje'}<BR>"; exit; I have sub dienice just for case, but everything seems to work fine. You can run this script from http://www.upitnik.net/email Could someone please tell me is it working for your email address, or what could be cause for this... [This message has been edited by Pepe (edited September 18, 2000).] |
|
#4
|
|||
|
|||
|
It must be mail server error, because this script started to work few days later and I didn't modify it at all...
![]() |
|
#5
|
|||
|
|||
|
Looks to me as a server configuration error.
I had the same thing in Php. The popmail accounts from those servers check if the mail send by you is from an existing mailadres. Which in your case isn't. It is you "perl-user" on your server who send the mail. In php you could set those setting iun this way that the mail adres existed at least it seemed to exist.. |
|
#6
|
|||
|
|||
|
I head a similar problem when using low-level access to SMTP server (connect to port 25 and send headers from there). Turned out that the SMTP server would only send emails to outside addresses if the domain specified in the HELO message (first message in SMTP protocol) specified an existing domain.
Maybe something similar applies here? Ton |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Email problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|