Need help with SMTP email account

Mr-Pro

Verified User
Joined
Dec 19, 2017
Messages
19
Hello guys ,
I have a script that sends emails to my clients . When I was using cpanel it was working correctly but since I moved to directadmin , it has stopped working . I created an email account in my panel and after creation , it gave me the address of SMTP server . What is the port number ? Is it 25 ? I entered my email username and password and SMTP address ( mail.domain.com ) but I'm not sure about port number . What should I enter in my script ?
Regards ,
 

Mr-Pro

Verified User
Joined
Dec 19, 2017
Messages
19
Well I get this error : SMTP Error: Could not connect to SMTP host.
The username and password I'm sure are correct because I enter them myself .
The SMTP server is mail.domain.com ( without . in the end )
and the ports are 25 and 587
I have entered the about and the problem still exists : SMTP Error: Could not connect to SMTP host.
I'm not sure what is wrong here . Is there any log that tells me why the script cant connect to SMTP host ?
Regards ,
 

Mr-Pro

Verified User
Joined
Dec 19, 2017
Messages
19
Ok I found out that I'm using PHPmailer in my script . I also know that I have run secure_php using custombuild . Is it possible that some needed function is disabled in process ? What functions does PHPmailer need to work ?
Code:
cd /usr/local/directadmin/custombuild
./build update
./build secure_php
regards ,
 

Mr-Pro

Verified User
Joined
Dec 19, 2017
Messages
19
my disabled functions are : disable_functions = exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname

are they in anyway related to exim , smtp , phpmailer ?
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
4,305
Location
Maastricht
It's better to say what domain it is, so we can test.
And which OS and which version are you using?

I don't think the disabled functions you have can make issues for phpmailer.
Could not connect looks like nothing is running on those ports.

Is Exim running, is Dovecot running? Have you tried by using telnet to port 25?
 
Top