form w/10 attachments

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

form w/10 attachments

Post by lukemaxpro »

I'm trying to use swiftmailer to send my test forms
Results to support@lvasp.com
(Once the test works, ill put it on my main form)

My test forum isn't working and gives me a strange error Im lost on,
(my host said SMTP is lvasp.com)
I follow the same setup as the online exxample
http://lvasp.com/requestformtest.php

What should I ask my server/host people, based on the error?

Thanks a lot for your help.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

The error being?....
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

Post by lukemaxpro »

Ill upload a screenshot as soon as I get home, but here is what the error says

Fatal error: Uncaught exception 'Swift_Connection_Exception' with message 'The SMTP connection failed to start [lvasp.com:25]: fsockopen returned Error Number 110 and Error String 'Connection timed out'' in /home/luke/public_html/swift/Swift/Connection/SMTP.php:293 Stack trace: #0 /home/luke/public_html/swift/Swift.php(225): Swift_Connection_SMTP->start() #1 /home/luke/public_html/swift/Swift.php(102): Swift->connect() #2 /home/luke/public_html/request_test.php(116): Swift->__construct(Object(Swift_Connection_SMTP)) #3 {main} thrown in /home/luke/public_html/swift/Swift/Connection/SMTP.php on line 293

This seems to be a SMTP error and its timing out again, thats the addresss my host said to use (lvasp.com)? Are they wrong?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Try this debug code, then send it to your host asking why it doesn't work:

Code: Select all

$sock = fsockopen("lvasp.com", 25, $errno, $errstr, 30);
echo "Connection shows:";
var_dump($sock);
echo "Error # " . $errno . ". Error message: " . $errstr;
Your server is refusing the connection.
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

Post by lukemaxpro »

Will do!
Thanks...
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

Post by lukemaxpro »

here is what my server said
Hello,

The given below is the mail server information.
mail server : mail.domain name (mail.lvasp.com)

Please note that we do not support coding part. For the coding part you need to contact the web programmer so that they will write the code for you. Please confirm and let us know if you have any issue.

Thank you.
so I changed lvasp.com to mail.lvasp.com and it still times out.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

I see your host has excellent grammar.

You still get a timeout on the debug code? Maybe try making sure you're using the correct port.
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

Post by lukemaxpro »

what does this mean
Hello Luke,

As you are using dedicated IP for your domain, you need to use IP address : 66.249.137.185 for your SMTP and POP3 details.


Please feel free to contact us back for further assistance.

Thank you,
Thanks (yea, my host doesn't seem too sharp)
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

They are giving you the direct IP to your mail server. Try it.
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

Post by lukemaxpro »

I did, it timed out again...
http://www.lvasp.com/swiftmailer.php
Should I not use a port? (How?)
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

Post by lukemaxpro »

Here is what I have on that page

Code: Select all

<?
$sock = fsockopen("66.249.137.185", 25, $errno, $errstr, 30);
echo "Connection shows:";
var_dump($sock);
echo "Error # " . $errno . ". Error message: " . $errstr;
?>
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I don't get a time out, I get this when visiting your URL:
Fatal error: Only variables can be passed by reference in /home/luke/public_html/swiftmailer.php on line 2
Are you sure the only code on that page is the debug code I posted? :?

You're really going to have to contact your host and harass them into telling you why you cannot connect to the relevant servers they're giving you bacause I can't do anything about this problem ;) fsockopen() is PHP's standard function for making network connections to other servers.... and they're blocking attempts to connect.
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

sorry

Post by lukemaxpro »

Yes, I tried to see what would happen if I took out the 25, (port)
This is what is in the page, do I need the ?>?

Code: Select all

<?
$sock = fsockopen("66.249.137.185", 25, $errno, $errstr, 30);
echo "Connection shows:";
var_dump($sock);
echo "Error # " . $errno . ". Error message: " . $errstr;
?>
Thanks again...
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: sorry

Post by Chris Corbyn »

lukemaxpro wrote:Yes, I tried to see what would happen if I took out the 25, (port)
This is what is in the page, do I need the ?>?

Code: Select all

<?
$sock = fsockopen("66.249.137.185", 25, $errno, $errstr, 30);
echo "Connection shows:";
var_dump($sock);
echo "Error # " . $errno . ". Error message: " . $errstr;
?>
Thanks again...
Never ever ever ever ever use <? as an opening tag. Bad bad bad. Use <?php and get out of that habit as soon as you can ;)

The ?> ending tag is not required and Zend say it should not be added if it's the last thing on the page. You'll notice none of my files end in ?> :)

I can see straight away when I go to that URL that it's just going to hang for 30 seconds until the connection times out. I'm 101% sure that something is blocking the network connection and your host do not seem to be aware of it.
lukemaxpro
Forum Newbie
Posts: 17
Joined: Sat Jul 28, 2007 1:52 am

Post by lukemaxpro »

This is their response
Hello Luke,

I have checked your IP address in servers block list, this confirms there is no issue with firewall at our end. The error you are getting is related to coding. I suggest check with some programmer about the error.


Thank you,
this is what is on the page

Code: Select all

<?php
$sock = fsockopen("66.249.137.185", 25, $errno, $errstr, 30);
echo "Connection shows:";
var_dump($sock);
echo "Error # " . $errno . ". Error message: " . $errstr;
Post Reply