I have a vagrant box running ubuntu 11.10 and a PHP script that uses swiftmailer to send email. My mail provider is SES, although I've replicated the issue with Mailgun and sendgrid as well.
My issue is that when I attempt to send mail on the vagrantbox I get "Connection to tcp://email-smtp.us-east-1.amazonaws.com:465 Timed Out". However when I run the exact same script from the host machine, it works fine.
Here's ifconfig on my vagrant box:
eth0 Link encap:Ethernet HWaddr 08:00:27:6e:cd:85
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe6e:cd85/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:272963 errors:0 dropped:0 overruns:0 frame:0
TX packets:138823 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:375217285 (375.2 MB) TX bytes:8245622 (8.2 MB)
eth1 Link encap:Ethernet HWaddr 08:00:27:50:d1:0c
inet addr:192.168.33.10 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe50:d10c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:181 errors:0 dropped:0 overruns:0 frame:0
TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18416 (18.4 KB) TX bytes:18416 (18.4 KB)
eth1 is a host only network interface with a static ip.
UPDATE: This appears to be a problem with swiftmailer. I had different copies of it between my host and guest boxes. I updated my host box, and now I'm getting the same issue where the connection times out.