Change Smtp Port From 25 To 587?

My ISP have blocked port 25 for sending mails from PHP, and instead have allowed port 587 or 465 to be used. how do i force php mail function to use port 587 instead of default 25? BTW : i am on MAX OSX 10.6.6 using MAMP PRO

UPDATE : i tried changing the settings in php.ini to this

[Code]....

you see it is still trying to connect via port 25? how do i change it in mac?

ANSWER :

For those of you using MAMP and not able to send the mail from php mail() function because of port 25 being blocked by ISP (in my case) here is some information for you to solve it. as OSX uses postfix to send mails and if you plan to use external smtp server like smtp.gmail.com which i used here is what you should be doing. you need to configure Postfix to use Gmail as a relay host

a) Open MAMP and in postfix change the domain of outgoing mail to smtp.gmail.com

b) open terminal and type sudo vi /etc/postfix/main.cf this will ask for your admin password enter it and it will open main.cf in vi editor

c) press ctrl+f and come to the end of the file and bring the cursor one line down from the end and press a , the editor will now switch to insert mode to edit the file.

in main.cf append this settings

relayhost = [smtp.gmail.com]:587
smtp_tls_security_level = verify
#smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

press :wq! and now type sudo /etc/postfix/sasl_passwd add or append you Gmail username and password in the file like this:

[smtp.gmail.com]:587 user@gmail.com:mypassword

again press :wq! to save and quit the file, and run the following command

sudo postmap /etc/postfix/sasl_passwd
sudo postfix reload



ADVERTISEMENT

Failure Of Smtp On Port 25

i have setup smtp on 2003 web edition, IIS. Port 25 is blocked and will not respond to any telnet open commands, so i have opened port 26 which now works fine... IS this any less secure than port 25?

View 1 Replies View Related

SMTP Port Emulation

I want to use my normal PHP mail scripts and such, but my ISP blocks port 25 SMTP calls.

They told me: "If your smtp server uses something other than port 25, you can use smtp.".

Is there a way to send the call on say.. port 26.. and have it recieved on port 25 to where I am sending it?

View 12 Replies View Related

Use Any Other Smtp Server And Port To Send My Mail

I cant send a simple mail from my pc. I dont know smtp server name and port of my ISP. Cant I use any other smtp server and port to send my mail. Wud u pls tell me the name as well as the port of such smtp server. What is the name n port of yahoo.

View 1 Replies View Related

SMTP Failed To Connect To Mailserver At Localhost Port 25

I dont know what I did but now I get this message Failed to connect to
mailserver at "localhost" port 25, verify your "SMTP"...

View 3 Replies View Related

Error Log Stating That It Could Not Connect To Smtp Host On Port 25

I have some code which sends an email to a recipient, but it is not working. I have checked the smtp host and port in the PHP.ini file and both are correct, I have also contacted my provider and know the smtp host and port are also the correct ones.

I am getting an error on apache's error log stating that it could not connect to smtp host on port 25. Notice that I am using the smtp host name, I can also ping it so I know I can get to it.

At one point, the emailing function worked, but it has now stopped working; not sure what the problem might be. I have actually created a mailtest.php with some very basic code to no avail.

View 1 Replies View Related

Warning: Mail(): Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP"

when i execute a mail program iam getting some error as follows:

Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:appservwwwmails.php on line 20

what is the solution to this problem Code:

View 6 Replies View Related

Change From - Address When Using Gmail Smtp Server?

I want to send an email from A to B,with HEADER and CONTENT through gmail. How to do that by PHP?

I've specified the FROM( [URL]but when I receive the email,it's still from my gmail account[URL]
$mail->From = [URL]
$mail->FromName = "Mailer";
$mail->AddAddress(" [URL]"Josh Adams");// name is optional
$mail->AddReplyTo(" [URL]"Information");

How do I change the FROM part?

View 5 Replies View Related

Warning: Mail(): Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting

may i know what the error.. i try the sending email. but it display these error:

Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:program fileseasyphp1-8wwwfp2.php on line 46
Cannot send password to your e-mail address ...

View 4 Replies View Related

Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting In .ini Or Use Ini_set()?

I used this one however

$to = "url";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: url . "
" .
"CC: url";
mail($to,$subject,$txt,$headers);

I have this error which is Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

View 1 Replies View Related

Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting In Php.ini

Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini

in php.ini I have:

SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = "H:WINNTsystem32" (this is where sendmail.dll is
sitting. H is the drive with w2k)

Other PHP code on that page is working.

What else should I check?

View 6 Replies View Related

Workaround For SOAP Request Failure When Wsdl Defines Service Port Binding As Https And Port 80?

I am consuming a SOAP web service using php5's soap extension. The service' wsdl was generated using Axis java2wsdl, and whatever options are used during generation result in the port binding url being listed as https://xxx.xxx.xxx.xxx**:80** If I download the wsdl to my server, remove the port 80 specification from the port binding location value, and reference the local file in my soapclient call it works fine.

However, if I try to reference it remotely (or download it and reference it locally, as-is) the call fails with a soap fault. I have no input into the service side so I can't make them change their wsdl-generation process. So, unless there's a way to make the soapclient ignorant of the port, I'm stuck with using a locally modified copy of someone else' wsdl (which I'd rather not do).

View 2 Replies View Related

URL Masking - Send A Page From Port 80 To Port 6999

I'm sure this has been asked before but I've just signed up to this
newsgroup and done a search but can't find anything. What I'm trying to do
is to send a page from port 80 to port 6999 but I don't want the :6999 bit
to show in the URL address field. Is it possible to either mask or hide
this within the header("Location:XXX") call?

In other words, if I enter http://www.mysite.com it finds the site using the
default port 80 but the information I have is actually on port 6999 so I'm
redirecting to http://www.mysite.com:6999 but I don't want the :6999 to be
displayed.

View 17 Replies View Related

Apache Cannot Be Run. Another Web Server Is Using The Web Port Or Port Is Blocked By Filewall

When I start EasyPHP: "Apache Cannot be Run. Another web server is using the web port or port is blocked by filewall"...

View 2 Replies View Related

Php Mail() Problem - Warning: Mail(): Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP"

I used dreamweaver as a tools for php coding..and Im using php version 4.3.3, Apache 2.0.47(win32) and MySQL as database. I found a problem with php mail() and the error says like this ;-
Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set().

View 3 Replies View Related

Warning: "Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting In Php.ini"

im having this error after changing my settings in php.ini ans sendmail.ini ..im using xampp.... Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:xampphtdocsminippromail.php on line 9

having the settings as the following:-
php.ini
Quote[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.gmail.com
; http://php.net/smtp-port
smtp_port = 465
; For Win32 only.
; http://php.net/sendmail-from
[Code].....

View 1 Replies View Related

Warning: Mail() [function.mail]: Failed To Connect To Mailserver At "localhost" Port 25, Verify Your "SMTP" And "smtp_port" Setting In Php.ini

PHP Code:

$con = "hi monday";
mail("mymail@lala.com","test imap.dll",$con,"From: [email]other@mail.com[/email]");

and the mod_imap is loaded. but the browser show:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in D:Apache2htdocssendmail.php on line 2

View 10 Replies View Related

Program Not Running On A Different Server - SMTP Error: Could Not Connect To SMTP Host

iv written some codes on sending mails using google smtp, yahoo smtp, and aol smtp in php. its working fine. but when im trying to run the same codes on a different server and domain it is giving me the following error: SMTP Error: Could not connect to SMTP host.

View 2 Replies View Related

PHPMailer: SMTP Error: Could Not Connect To SMTP Host

I've used PHPMailer on several projects but now I'm stuck. It gives me the error: SMTP Error: Could not connect to SMTP host. I've tried sending email from Thunderbird and it works ! But not through PHPMailer ... Here are the settings from Thunderbird:.....

$mail = new PHPMailer();
$mail->IsSMTP(); // send via SMTP
$mail->Host = SMTP_HOST; // SMTP servers
$mail->Port = SMTP_PORT; // SMTP servers
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = SMTP_USER; // SMTP username
$mail->Password = SMTP_PASSWORD; // SMTP password
[Code]...

View 3 Replies View Related

Send Email Using GMail SMTP Server - Set Pop / Smtp In Php.ini

Possible Duplicate: Send email using GMail SMTP server from PHP page i have a mac and i was wondering how i can set pop/smtp using gmails information in php.ini?

View 1 Replies View Related

Send Mail Through SMTP Using Gmails Smtp Server?

Im trying to send mail through SMTP using gmails smtp server. But the problem is I get a Failed to connect error. I dont know what I'm doing wrong. Perhaps someone could give insight of why the problem is occurringHere is my code:

Code:
<?php
[code]...

View 4 Replies View Related

SMTP Error: Could Not Connect To SMTP Host

I have this code, and all works well in my local server. The email is sent without any problem. But now I pass the content to webserver, and I get this error... SMTP Error: Could not connect to SMTP host. SSL is enable in the server..correct? so, what is the problem?

$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
[Code]...

View 1 Replies View Related

SMTP Error "Could Not Connect To SMTP Host" With PHPMailer

I am getting "SMTP Error: Could not connect to SMTP host." error while trying to send mails using GMAIL SMTP and PHPMailer.. The code is working perfectly in local environment but getting error in live (bluehost) server.

View 1 Replies View Related

Mailer Error: SMTP Error: The Following SMTP Error: Data Not Accepted?

The following code gives the message Mailer Error: SMTP Error: The following SMTP Error: Data not accepted. But when I replace $EmailAdd with a [URL]. The mail was sent.What's wrong with my code? I'm kind of new in php, especially in dealing with mail functions.

$sql1 = "SELECT Email_Address FROM participantable where IDno=$studId";
$result1 = mysql_query($sql1);
while ($row1 = mysql_fetch_assoc($result1)){

[code]....

View 3 Replies View Related

SSL Vs Port 80

I have a page that can be pulled up either on SSL port 443 or on regular
HTTP port 80.

Can I use PHP to determine through which port the page is being requested?

View 3 Replies View Related

Specify Non-standard DB Port!

I need to modify the function call below to specify port # 5434. Now I don't know PHP and I have tried the obvious (adding port=5434 before the dbname=%s in the sprintf portion of the call, but that didn't work, where / how to I specify the non-standard port #? Code:

View 5 Replies View Related

Port Check In PHP

how can i check is port number xxx opened on localhost ?

View 1 Replies View Related

Port Ping?

I want to check with a php script if a port / serverservice is down.
It would be great if I can check the ping time, too.

But how I can realize that?

View 9 Replies View Related

Specify The Source UDP Port Using It?

I need to send a message via UDP to a remote equipment. I know that if I use the same UDP port that it used while sending information to the server to write back to it the messages goes through. I am currently using:

$fp = fsockopen( $destination, $port, $errno, $errstr);
if (!$fp) {
echo "ERROR: $errno - $errstr
";
} else {
fwrite($fp, $m);
fclose($fp);
}

But in this way I have no control of which port is going to be used as the source port. In Java have one can use: client = new DatagramSocket(21000); Is there a way to do something similar using PHP.

View 2 Replies View Related

Use The COM Port For Switching?

Can anyone point me in the right direction as to what is all involved in developing an interface that will use the COM port to switch a set of dry contacts on and off? I have an application that I am developing at present that needs to control an external switch that uses wires. The COM port should switch between a short and an open.

View 4 Replies View Related

C# - Write To A COM Port With .Net?

How would I go about writing to a COM port, trying to convert the following example to .Net (C#), pecifically the PHP part? If possible is there an easier way to write out to a USB?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved