Page 1 of 1

mail() function in Win98, dialled connection (important!)

Posted: Mon Nov 04, 2002 2:59 am
by mhrtko
Hi all,

how can I send mails in dialled connection in my conf., is it possible at all?

Configuration:
Windows 98, PWS, PHP 4.0.2, dial-up.

In php.ini I have the same settings as in Outlook Express, but function mail() can't send mails to IPS.

Thanks to all.
Please, it is very important for me how to resolve this problem.

Michal.

Posted: Mon Nov 04, 2002 4:33 am
by volka
take a look at the server's error.log
maybe there's something like
PHP Warning: Failed to connect to mailserver, verify your "SMTP" setting in php.ini in xyz.php

mail() function in Win98, dialled connection (important!)

Posted: Mon Nov 04, 2002 6:03 am
by mhrtko
SMTP and sendmail_from are set correctly (I suppose), because with these settings I can send mails through Outlook.
Need I set somewhere(?) in php.ini socket, or number of port?
Has PWS somewhere (error) logs?
Who has done sending mails in Win98 and dialled connection in local computer?

Michal.

Posted: Mon Nov 04, 2002 6:14 am
by seg
Pardon me for being a bit off topic, but I'd hate to think this is ANOTHER e-mail spammer daring to ask the public (anti-spam) community for help because he/she can't get their new spamming script to work. Maybe I'm paranoid, but I see very few legit reasons to want to send send email from a dekstop computer using server software. If I wanted to spam people that's how I'd do it.

-seg

Posted: Mon Nov 04, 2002 9:25 am
by DeGauss
Last time i checked, Outlook wasn't an SMTP service.

Stop trying to send email through a client, it won't work.

Posted: Mon Nov 04, 2002 11:45 am
by volka
Last time i checked, Outlook wasn't an SMTP service.

Stop trying to send email through a client, it won't work.
He/She uses the same host-string in outlook and php, I suppose ;)
Maybe I'm paranoid, but I see very few legit reasons to want to send send email from a dekstop computer using server software. If I wanted to spam people that's how I'd do it.
Hosting one's own forum e.g.
Or mailing the latest firewall report or ... or (maybe even something useful, maybe even spam ;) )
Has PWS somewhere (error) logs?
probably yes, but I don't know where. PWS is that toy microsoft provides with their dos-gui, isn't it? ;)
If you can't find it try display_errors = On in your php.ini.
Have you checked sendmail_from =? Some (mail-)provider only accept mails from valid accounts.
Is it plain smtp or do you have to authorize before the server accepts mail (pop3 before smtp e.g.) ?

No legitimate uses???

Posted: Mon Nov 04, 2002 7:08 pm
by LetterJ
How about virtually every portal and bulletin board system including this one that sends out email verification? How about double-opt-in newsletters? And as for a spamming script with PHP on a Win98 dialup? You do realize that routing through your ISP's SMTP server will look to the ISP pretty much just like your regular mail client. You really aren't going to do much more than you are with a copy of Eudora. Dialup ISPs that want to stop spam already block port 25, so he won't be running a full mail server with direct connections.

The easiest way to get this working on Windows is to install a copy of Mercury Mail from the makers of Pegasus. You can set it up to do outgoing SMTP with POP3 before SMTP just like the really paranoid mail clients, but PHP can use it.

Re: No legitimate uses???

Posted: Mon Nov 04, 2002 7:55 pm
by seg
LetterJ wrote:...And as for a spamming script with PHP on a Win98 dialup? You do realize that routing through your ISP's SMTP server will look to the ISP pretty much just like your regular mail client...
Yeah, I figured I'd get flamed. While I'd love to argue the technical aspects of writting a mass-mail spamming script in php, I won't. So sorry you guys don't agree with my view of what the situation MIGHT be with our broken-english friend.

But it doesn't matter.

Posted: Mon Nov 04, 2002 8:32 pm
by LetterJ
My point (not well made I admit) is that even if his intention is to use it to spam, it doesn't matter. The mail() function only works on Windows works if you have an SMTP server that doesn't do POP3 before SMTP and MOST ISP's now won't work with the mail() function on Windows. So, that leaves running your own mail server. However, because most of those ISPs are also just as paranoid as anyone is about spam, they block port 25. So that leaves a mail server that looks like a mail client from the ISP's perspective. And, once we're at that point, PHP is just a glorified mail client. You can "spam" with Eudora and huge BCC lists.

Could this guy's intention be to spam? Sure. However, lots of people ask PHP questions while their purposes for the answer will result in popunder ads, software with reprehensible EULA's and other distasteful things. However, given the number of times that I've heard questions related to the mail() function on Windows go unanswered while those on Unix get quick replies, I tend to favor giving the benefit of the doubt.

And, I've definitely had to deal with the personal conflict that things like this bring. PHPTriad (one of my projects) has been downloaded about 2 million times. Do you know how many of those people have put their web servers to nasty purposes? Lots. I've received the messages of outrage from users who hit those sites only to find traces of my software and blame me. But, I've also heard from dozens of users who have learned to use PHP and become productive web developers.

If someone asks for registration keys for Zend encoder, I'll come down hard on them. However, I will try to help someone trying to use a legitimate function of PHP on a legitimate PHP platform.

Re: But it doesn't matter.

Posted: Mon Nov 04, 2002 8:53 pm
by seg
Ugg my god you are right. I'm sorry. Jezz, my first point is completely asinine. I was thinking of using a linux-based system(which most come with an smtp server software packaged along)but on a Windows machine it’s a little more difficult to get an smtp server. And if someone went through the trouble of getting or writing a sendmail daemon for windows making a spamming script in PHP would be redundant.

Hey, color me paranoid. You are right, and I am wrong. What’s a maniac gonna do? :D

Posted: Tue Nov 05, 2002 4:27 am
by volka
Now my ISP checks source-IP and the sender-field in a mail.
A year ago they only checked the source-ip and accepted virtually any sender name. They get smarter ;)

Posted: Tue Nov 05, 2002 5:32 am
by DeGauss
The only reason i personally wouldn't give out help on the mail function is because it's so well documented with user notes on php.net that you *shouldn't* need help with it.

If you need help with SMTP or Sendmail, you should start looking up RFC's and crap like that.

There's an SMTP service built into IIS (which you don't want to install. Ever.), you can download a crapload of SMTP servers from tucows that make it so easy to start your own outbound mail service that again, you wouldn't need help.

If someone asked for help on Sendmaill, i'd help out as much as i could, because the Sendmail manual is the size of a barn.

While i applaud any effort by a PHP programmer to advance their knowledge of the language, i am always wary of people asking about certain functions, because i know what i would (did) do with them if i was asking about them. For example, the basic premise of cURL is a php module to help steal bandwidth, but hey, it's there and you can use it.

I digress.

In summing up:

Windows + Mail function = No.