Click to See Complete Forum and Search --> : Mail Function
cody44
08-18-2006, 05:42 AM
I have had php4 and MySql with Apache running for the past year now and have just reformatted the drive. I have reinstalled all the above back on but have a problem with testing forms.
My Host is oneandone.co.uk and need to know the isp setting for oneandone, have tried to contact them numberous times and I think I am wasting my time.
I believe last time it was set up it was schlund !!! but the below fails to work.
IS THERE ANYONE HOSTING WITH ONEANDONE who has their mail function settings working okay, would appreciate some advice here.
[mail function]
; For Win32 only.
SMTP = mail.schlund.de ; for Win32 only
smtp_port = 25
sendmail_from= info@bdimedia.com ; for Win32 only
Thanks in advance.
Regards
Mark
tsinka
08-18-2006, 02:43 PM
Hi,
which package do you have at 1&1 ?
Thomas
cody44
08-19-2006, 06:04 AM
Hi Thomas I have the business hosting package
Mark
tsinka
08-19-2006, 07:05 AM
Ok,
assuming that the domain is bdimedia.com you can get the mail exchanger by doing something like:
1. open a dos prompt
2. execute nslookup
3. execute the command: set type=mx
4. then enter the domain: bdimedia.com
That returns:
bdimedia.com MX preference = 10, mail exchanger = mx00.schlund.de
bdimedia.com MX preference = 10, mail exchanger = mx01.schlund.de
So try one of these hosts:
mx00.schlund.de
mx01.schlund.de
Thomas
cody44
08-19-2006, 07:08 AM
Many thanks Thomas,
I will have a go at this in the next hour and let you know the outcome.
tsinka
08-19-2006, 07:09 AM
One additional note: Using that hosts shouldn't be a problem as long as the receipient is a bdimedia.com account. In other cases you may need to use another server and/or SMTP auth or something like that.
cody44
08-19-2006, 10:38 AM
When testing a form in php I get an error message asking me to verify the SMTP and smtp port settings. Cant understand as I truely believe these are correct as below.
[mail function]
; For Win32 only.
SMTP = "mx00.schlund.de" ; for Win32 only
smtp_port = 587
sendmail_from= "info@bdimedia.com"; for Win32 only
; For Win32 only.
;sendmail_from = "usr/sbin/sendmail"
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
tsinka
08-19-2006, 11:07 AM
Ok,
you set the port to 587. In most cases this means that you need to use AUTH-SMTP. The PHP mail function doesn't support AUTH-SMTP. You need to use a mailer class like phpmailer or swift mailer in that case.
Didn't it work with port 25 ?
cody44
08-19-2006, 11:10 AM
Have tried port 25 and keeps coming up with the same message "check your SMTP and port settings
cody44
08-19-2006, 11:11 AM
cant understand as I have had this set up before and it worked okay!!
XPertMailer
08-19-2006, 12:07 PM
The fast way (without any php.ini settings) you can send an e-mail with smtp autentication and (if required) TLS/SSL support like:
<?php
set_time_limit(0);
// path to smtp.php from XPM2 package
require_once '/path/smtp.php';
$mail = new SMTP;
$mail->Delivery('relay');
// using port 465 and TLS connection
$mail->Relay('smtp.hostname.net', 'username', 'password', 465, 'autodetect', 'tls');
$mail->From('username@hostname.net', 'my name');
$mail->AddTo('client@destination.com', 'user name');
$mail->Text('Text version of the message');
$sent = $mail->Send('Hello World!');
echo $sent ? 'Success' : $mail->result;
?>
For more information: http://xpertmailer.sourceforge.net/DOCUMENTATION
cody44
08-19-2006, 12:20 PM
Thanks will have a go !!
Regards
Mark
tsinka
08-19-2006, 12:24 PM
Ok,
I checked all possible smtp servers and I think that you may need to use a php mailer like e.g. phpmailer, swift mailer or xpertmailer. All smtp servers either refuse smtp connections from dynamic DSL/dial-up connections or require at least smtp authentication. The setup of that servers may have changed in the past.
Just to make sure that I understood you completely:
You have a package at 1&1 and you want to send mail from your development windows pc using one of the mail servers of 1&1.
In that case you need to use smtp.1und1.de as smtp server and use smtp authentication.
I couldn't find a smtp server that allows you to send mail without at least SMTP authentication or a source ip that isn't in one of the dynamic dial-up ranges.
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.