| SitePoint Sponsor |




Hi Jemz,
Normally your are supposed to use the SMTP of the email server's local network. This means that normally you should put the smtp of your free host into swift mailer and NOT gmail's or the I.P. of gmail's SMTP. Remember, SMTP are supposed to ensure that valid users are sending messages. SMTP (on your local SwiftMail server) routes the message to another mail server. You should use in Swiftmailer the SMTP of your free host.
Please post the headers of the gmail emails that your received from Swiftmailer; the one using smtp.gmail.com as the SMTP (which is the wrong SMTP by the way) and also the IP. Change your email address to user@somewhere.com. The headers will let us help answer your question of why this worked.
Steve




Hi serverstorm, I am confuse
you mean i am going to open my gmail and then ...what do you mean the "headers" can you please give me example what you mean by headers or just a screenshot.I apologize but i cannot get what is headers in the gmail.Please post the headers of the gmail emails that your received from Swiftmailer
this is what i understand
from: John Doe <someone@yahoo.com>
to: jemz <thisismygmail@gmail.com>
date: Sat, Dec 15, 2012 at 3:19 AM
subject: This is my subject jemz
please correct me if am wrong.
Thank you in advance.
Hi Jemz,
This is not your headers. What mail client do you use or do you just use web mail. If so what web mail provider do you use the most.
By default headers are not shown as the look complicated and clutter email messages. Every email has associated headers. Here is an example of what one of the sitepoint book offers headers look like:
You can see the I've changed the smtp routed through somedomaindc.somedomain.com and the recipient is user@example.com (I've changed these for privacy sake). Do you now understand that you can see the full path of this SitePoint message. This is what I want to see on the messages that you sent to either your gmail or yahoo accounts as it will answer what happened when you tried your different ways of sending and they were all successful.Code:Return-Path: <sitepoint-jdkjuld1wdkjkujku1y@createsend1.com>Received: from mailgate.somedomain.com (somedomaindc.somedomain.com [172.16.0.10]) by mailportal.somedomain.com (Scalix SMTP Relay 11.4.2.12068) via ESMTP; Tue, 18 Dec 2012 17:42:29 -0500 (EST)Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.somedomain.com (Postfix) with ESMTP id 973D61BC81B7; Tue, 18 Dec 2012 17:42:29 -0500 (EST)Received: from mailgate.somedomain.com ([127.0.0.1]) by localhost (somedomaindc.somedomain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ioERtUhrMu1u; Tue, 18 Dec 2012 17:42:28 -0500 (EST)Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.somedomain.com (Postfix) with ESMTP id 97CFB1BC81BA; Tue, 18 Dec 2012 17:42:28 -0500 (EST)Received: from mx120.d.outbound.createsend.com (mx120.d.outbound.createsend.com [27.126.148.120]) by mailgatesomedomain.com (Postfix) with ESMTP id 4A0CF1BC81B7 for <user@example.com>; Tue, 18 Dec 2012 17:42:28 -0500 (EST)Received: by mx120.d.outbound.createsend.com id hq3ol81hsps4 for <user@example.com>; Wed, 19 Dec 2012 09:10:53 +1100 (envelope-from <SitePoint-jdkjuld1wdkjkujku1y@createsend1.com>)Date: Wed, 19 Dec 2012 09:10:00 +1100From: "SitePoint" <books@sitepoint.com >Reply-To: books@<a href="http://www.sitepoint....epoint.com</a> To: "user@example.com" <user@example.com>Message-ID: <cm.091000.jdkjuld.wdkjkujku.y@createsend1.com>Subject: Day 21- $9 PRINT Books ... in the SitePoint Christmas SaleX-Virus-Scanned: amavisd-new at hyos.comX-Spam-Flag: NOX-Spam-Score: 0.253X-Spam-Level: X-Spam-Status: No, score=0.253 tagged_above=-99 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, HTML_IMAGE_ONLY_24=1.618, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_DKIM_INVALID=0.01, URIBL_GREY=0.424] autolearn=noX-Greylist: delayed 600 seconds by postgrey-1.33 at somedomaindc.somedomain.com; Tue, 18 Dec 2012 17:42:28 ESTDKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=cm; d=sitepoint.com; h=From:To:Reply- To:Date:Subject:MIME-Version:Content-Type:List-Unsubscribe:Message-ID; i=books@sitepoint.com ; bh=tD1RRy0KGmntoJR4rq1xJ/8hMq8=; b=D1qt8YS9ROCzXG8MyJ9cORW5jqu8h/WgyECiMhT8ONo3m4++74zp26TlzXuNYPpEoXwFEix9BmQm 7GI5Xa0j0dxGLQu52H+waFOtsccHb9RnDyjwCnrvdXcGXikcQRrDDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=cm; d=sitepoint.com; b=noSahFoOXHZFOM4YRdt/PF/WI/fTRiIlump+N7E/j0G/NkfD4AUBcgHX0ZfRqqQYW+AmG3SXKoqn OY/e5wREg1NFNwhHgq1tsMGeW4YbWmO8lA0+RTsGSR4wGvyZ02qR;X-Mailer: Create SendX-Complaints- To: abuse@createsend1.comList-Unsubscribe: <http://unsub.createsend1.com/t/y-u-jdkjuld-wdkjkujku/>MIME- Version: 1.0Content-Type: multipart/alternative; boundary="_=aspNetEmail=_20a38de9a1e24ca6b7f3e84e17291b28"-- _=aspNetEmail=_20a38de9a1e24ca6b7f3e84e17291b28Content-Type: text/plain; charset="US- ASCII"Content-Transfer-Encoding: quoted-printableContent-Disposition: inline
Regards,
Steve
Ralph's post was not saying that you are off-topic it was showing that this part of the conversation was not directly about your topic so in these cases a poster uses [ot]Off topic idea here...[/ot] tags around an idea to show that they are not trying to derail the original conversation.
Sorry, I missed pointing this out earlier.
Regards,
Steve




Hi steve, Thank you for the reply,...I did not use any mail client like Thunderbird,Spicebird,Claws Mail,....the one that i posted which is the php code with the configuration of swiftmailer, the one that i said before that i can send messages now, is the only one that i use in my free host.I just upload that small php code then i open my website...like this mypagesample.host22.com then it display to my browser succesfully sent.then i look at in my gmail account i see the message that i wrote in the php code.the subject is "sample mail"...the body is "you got it"...








Hi ServerStorm, this one
is this be found in the address bar?because i am looking in the gmail and i could not see like this.Code:Return-Path: <sitepoint-jdkjuld1wdkjkujku1y@createsend1.com>Received: from mailgate.somedomain.com (somedomaindc.somedomain.com [172.16.0.10]) by mailportal.somedomain.com (Scalix SMTP Relay 11.4.2.12068) via ESMTP; Tue, 18 Dec 2012 17:42:29 -0500 (EST)Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.somedomain.com (Postfix) with ESMTP id 973D61BC81B7; Tue, 18 Dec 2012 17:42:29 -0500 (EST)Received: from mailgate.somedomain.com ([127.0.0.1]) by localhost (somedomaindc.somedomain.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ioERtUhrMu1u; Tue, 18 Dec 2012 17:42:28 -0500 (EST)Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.somedomain.com (Postfix) with ESMTP id 97CFB1BC81BA; Tue, 18 Dec 2012 17:42:28 -0500 (EST)Received: from mx120.d.outbound.createsend.com (mx120.d.outbound.createsend.com [27.126.148.120]) by mailgatesomedomain.com (Postfix) with ESMTP id 4A0CF1BC81B7 for <user@example.com>; Tue, 18 Dec 2012 17:42:28 -0500 (EST)Received: by mx120.d.outbound.createsend.com id hq3ol81hsps4 for <user@example.com>; Wed, 19 Dec 2012 09:10:53 +1100 (envelope-from <SitePoint-jdkjuld1wdkjkujku1y@createsend1.com>)Date: Wed, 19 Dec 2012 09:10:00 +1100From: "SitePoint" <books@sitepoint.com >Reply-To: books@<a href="http://www.sitepoint....epoint.com</a> To: "user@example.com" <user@example.com>Message-ID: <cm.091000.jdkjuld.wdkjkujku.y@createsend1.com>Subject: Day 21- $9 PRINT Books ... in the SitePoint Christmas SaleX-Virus-Scanned: amavisd-new at hyos.comX-Spam-Flag: NOX-Spam-Score: 0.253X-Spam-Level: X-Spam-Status: No, score=0.253 tagged_above=-99 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, HTML_IMAGE_ONLY_24=1.618, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_DKIM_INVALID=0.01, URIBL_GREY=0.424] autolearn=noX-Greylist: delayed 600 seconds by postgrey-1.33 at somedomaindc.somedomain.com; Tue, 18 Dec 2012 17:42:28 ESTDKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=cm; d=sitepoint.com; h=From:To:Reply- To:Date:Subject:MIME-Version:Content-Type:List-Unsubscribe:Message-ID; i=books@sitepoint.com ; bh=tD1RRy0KGmntoJR4rq1xJ/8hMq8=; b=D1qt8YS9ROCzXG8MyJ9cORW5jqu8h/WgyECiMhT8ONo3m4++74zp26TlzXuNYPpEoXwFEix9BmQm 7GI5Xa0j0dxGLQu52H+waFOtsccHb9RnDyjwCnrvdXcGXikcQRrDDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=cm; d=sitepoint.com; b=noSahFoOXHZFOM4YRdt/PF/WI/fTRiIlump+N7E/j0G/NkfD4AUBcgHX0ZfRqqQYW+AmG3SXKoqn OY/e5wREg1NFNwhHgq1tsMGeW4YbWmO8lA0+RTsGSR4wGvyZ02qR;X-Mailer: Create SendX-Complaints- To: abuse@createsend1.comList-Unsubscribe: <http://unsub.createsend1.com/t/y-u-jdkjuld-wdkjkujku/>MIME- Version: 1.0Content-Type: multipart/alternative; boundary="_=aspNetEmail=_20a38de9a1e24ca6b7f3e84e17291b28"-- _=aspNetEmail=_20a38de9a1e24ca6b7f3e84e17291b28Content-Type: text/plain; charset="US- ASCII"Content-Transfer-Encoding: quoted-printableContent-Disposition: inli
Hi Jemz,
No the headers are normally turned on/off in the account settings. By default they are normally turned off as they make most emails look to confusing and become hard to read. However, the headers tell most of the story of an email's trip, so it is a really good way to determine how things worked.
Here is how to see it for the messages sent from SwiftMailer:
- Log in to Gmail
- Open the message you'd like to view headers for.
- Click the down arrow next to Reply, at the top of the message pane.
- Select Show Original.
I got this by googling show headers gmail








Hi ServerStorm,
This is the configuration in my swiftmailer
and this is the header from my gmail.$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, 'ssl')
This is my second configuration in my swiftmailer using the ipCode:Delivered-To: someuser@gmail.com Received: by 10.220.66.72 with SMTP id m8csp153235vci; Sat, 22 Dec 2012 11:06:30 -0800 (PST) X-Received: by 10.236.149.210 with SMTP id x58mr16705025yhj.42.1356203189194; Sat, 22 Dec 2012 11:06:29 -0800 (PST) Return-Path: <fromMysomeOne@yahoo.com> Received: from postlady.000webhost.com (smtp1.000webhost.com. [31.170.163.252]) by mx.google.com with ESMTP id r2si7155449ann.104.2012.12.22.11.06.27; Sat, 22 Dec 2012 11:06:29 -0800 (PST) Received-SPF: neutral (google.com: 31.170.163.252 is neither permitted nor denied by best guess record for domain of fromMysomeOne@yahoo.com) client-ip=31.170.163.252; Authentication-Results: mx.google.com; spf=neutral (google.com: 31.170.163.252 is neither permitted nor denied by best guess record for domain of fromMysomeOne@yahoo.com) smtp.mail=fromMysomeOne@yahoo.com Received: by postlady.000webhost.com ([000webhost.com Mail Server], from userid 99) id 65C3E6041C; Sat, 22 Dec 2012 14:06:27 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on postlady.000webhost.com X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=7.0 tests=DKIM_ADSP_CUSTOM_MED, FORGED_YAHOO_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,TVD_RCVD_SPACE_BRACKET autolearn=disabled version=3.3.2 Received: from srv30.000webhost.com (srv30.000webhost.com [31.170.160.94]) by postlady.000webhost.com ([000webhost.com Mail Server]) with ESMTP id 4592E6041A for <someuser@gmail.com>; Sat, 22 Dec 2012 14:06:27 -0500 (EST) Received: by srv30.000webhost.com (Postfix, from userid 3284964) id 4308D28067; Sat, 22 Dec 2012 14:06:27 -0500 (EST) To: jemz <someuser@gmail.com> Subject: This is my subject jemz X-PHP-Script: mywebsite.host22.com/index.php for 66.249.75.186 Message-ID: <1356203187.50d604b321d38@peanutbutter.host22.com> Date: Sat, 22 Dec 2012 14:06:27 -0500 From: John Doe <fromMysomeOne@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Congratualtions jemz to your MX record configuration sentmail
Here is the output..$transport = Swift_SmtpTransport::newInstance('31.170.160.208', 465, 'ssl')
Thank you in advance.Code:Delivered-To: someuser@gmail.com Received: by 10.220.66.72 with SMTP id m8csp201511vci; Sun, 23 Dec 2012 14:56:12 -0800 (PST) X-Received: by 10.236.140.107 with SMTP id d71mr19314219yhj.80.1356303372112; Sun, 23 Dec 2012 14:56:12 -0800 (PST) Return-Path: <fromMysomeOne@yahoo.com> Received: from postlady.000webhost.com (smtp1.000webhost.com. [31.170.163.252]) by mx.google.com with ESMTP id m61si13177219yhj.128.2012.12.23.14.56.12; Sun, 23 Dec 2012 14:56:12 -0800 (PST) Received-SPF: neutral (google.com: 31.170.163.252 is neither permitted nor denied by best guess record for domain of fromMysomeOne@yahoo.com) client-ip=31.170.163.252; Authentication-Results: mx.google.com; spf=neutral (google.com: 31.170.163.252 is neither permitted nor denied by best guess record for domain offromMysomeOne@yahoo.com) smtp.mail=fromMysomeOne@yahoo.com Received: by postlady.000webhost.com ([000webhost.com Mail Server], from userid 99) id F1F4760465; Sun, 23 Dec 2012 17:56:11 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on postlady.000webhost.com X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=7.0 tests=DKIM_ADSP_CUSTOM_MED, FORGED_YAHOO_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,TVD_RCVD_SPACE_BRACKET autolearn=disabled version=3.3.2 Received: from srv30.000webhost.com (srv30.000webhost.com [31.170.160.94]) by postlady.000webhost.com ([000webhost.com Mail Server]) with ESMTP id D06E960461 for <someuser@gmail.com>; Sun, 23 Dec 2012 17:56:11 -0500 (EST) Received: by srv30.000webhost.com (Postfix, from userid 3284964) id C65D92800D; Sun, 23 Dec 2012 17:56:11 -0500 (EST) To: jemz <someuser@gmail.com> Subject: This is my subject jemz X-PHP-Script: mywebsite.host22.com/index.php for 112.207.155.49 Message-ID: <1356303371.50d78c0baadaf@mywebsite.host22.com> Date: Sun, 23 Dec 2012 17:56:11 -0500 From: John Doe <fromMysomeone@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Congratualtions jemz to your MX record configuration sentmail
Hi Jemz,
The following part of your headers (of the IP versions) tells what is happening:You can see that your are relaying via the google smtp and it tries to resolve your IP. I am surprised that this is not getting delivered as SPAM as you can see that it is not permitted or denied. I also don't like the idea of using Goggle's smtp as there is not a guarantee that the ISP that you route the mail through won't start enforcing that mail traffic must route through their server. This may be the case for Port 25 but as you are using SSL this may allow you to get around this. Still I would recommend that you try to use smtp1.000webhost.com as the smtp that I try to route through. If smtp1.000webhost.com authenticates and routes your mail to google or yahoo then as long as you pass the SPAM threshold then your messages should still route.Code:Received: from postlady.000webhost.com (smtp1.000webhost.com. [31.170.163.252]) by mx.google.com with ESMTP id m61si13177219yhj.128.2012.12.23.14.56.12; Sun, 23 Dec 2012 14:56:12 -0800 (PST)Received-SPF: neutral (google.com: 31.170.163.252 is neither permitted nor denied by best guess record for domain of fromMysomeOne@yahoo.com) client-ip=31.170.163.252;Authentication-Results: mx.google.com; spf=neutral (google.com: 31.170.163.252 is neither permitted nor denied by best guess record for domain offromMysomeOne@yahoo.com) smtp.mail=fromMysomeOne@yahoo.com
I am quite surprised that google allows you to relay messages in the way you have done. This is not good practise.
Steve








A quick search shows that 000webhost.com does not seem to publish their smtp port. This means you can try 25 or 465, however it is unlikely that they will allow you to use their SMTP.
Given this, I would set your gmail account and smtp in swiftmailer. The messages that you send will be listed from youremailaddress@gmail.com. You will use port 465 like you had tried in your earlier attempt. Keep in mind that they can block this at any time, so there is not guarantee of uptime.
I would strongly urge you to get onto a host that is better set-up for handling email and setup the proper email mx dns records for your custom domain. This way you will have more control and likely more stability.
Steve








Bookmarks