Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
BKBK #1
Re: Using GMail smtp server for sending emails
....a way to configure CF to use gmail to send out email ... Looks like SSL
might be the problem.
But why? Coldfusion can send out e-mail from a gmail sender with or without
gmail, and with or without SSL.
<cfmail to="him@hisDomain.com" from="me@gmail.com" server="127.0.0.1"
username="myMailServer_username" password="myMailServer_password"
subject="Gmail test" timeout="60">
Eureka! It works!
</cfmail>
BKBK Guest
-
CFMAIL sending two emails
I'm going to give these suggestions a try now. The weird thing for me is it is only sending double emails to the cc recipient. Thanks guys. -
Problems sending mail with Windows 2003 server's SMTP server (I'm also using the integrated POP3 service)
Hi, I am setting up POP3 accounts for my users. I am using the POP3 and SMTP services built into Windows 2003 Server Std Edition. My users can... -
sending chinese character emails via Net::SMTP using Mime-tools
Howdi, I want to send chinese character emails via Net::SMTP perl. Is the most reliable format MIME encoding? If so, and I have a stream of... -
sending form data as email using SMTP server ???
How can I take my form data and send it as an email using my SMTP server located @ my ISP using PHP ? my form has several fields: TO: this is... -
Sending message to SMTP server using CDONTS component
I recently set up a web site which I am running locally on my laptop using ASP.Net. From a web form on the site I am attempting to send an email... -
Kronin555 #2
Re: Using GMail smtp server for sending emails
Gmail has an SPF record associated with it, so don't expect sending emails out
from a gmail address using a non-gmail SMTP server to work for long. More and
more mail servers are checking SPF records and using that to filter spam.
Kronin555 Guest
-
BKBK #3
Re: Using GMail smtp server for sending emails
Kronin555,
The mail server I'm running alongside Coldfusion is
[url]http://www.jscape.com/articles/sending_email_smtp_ssl_gmail.html[/url].
It is in Java. However, I've converted it into Coldfusion for you.
Prerequisites
1. Create the new folder secure_inet in C:\CFusionMX7\Mail;
2. On the jscape.com page above, click on the link to
download "Secure iNet Factory";
3. Enter your e-mail address and agree to the terms;
4. Download setup.exe ;
5. Launch the setup executable and choose to extract to the directory
C:\CFusionMX7\Mail\secure_inet . This ensures that the key JAR file,
sinetfactory.Jar will be stored as
C:\CFusionMX7\Mail\secure_inet\lib\sinetfactory.Ja r;
6. In the Coldfusion Administrator, add this to the JVM classpath:
C:\CFusionMX7\Mail\secure_inet\lib\sinetfactory.Ja r
7. Restart the Coldfusion MX server service.
8. Run the coldfusion script. It should go like an intercity train.
<cfscript>
// create new instance
SSL_SMTP_obj =
CreateObject("java","com.jscape.inet.smtpssl.SmtpS sl").init("smtp.gmail.com",465
);
// address the message
email_message =CreateObject("java","com.jscape.inet.email.EmailM essage");
email_message.setTo("me_myself@testDomain.com");
email_message.setFrom("myGmailUsername@gmail.com") ;
email_message.setSubject("This time it's for real.");
email_message.setBody("Test succeeded. Eureka!");
// connect, send the message, disconnect
try
{
SSL_SMTP_obj.connect();
SSL_SMTP_obj.login("myGmailUsername","myGmailPassw ord");
SSL_SMTP_obj.send(email_message);
SSL_SMTP_obj.disconnect();
}
catch(Exception e)
{
WriteOutput(e);
}
</cfscript>
BKBK Guest
-
Kronin555 #4
Re: Using GMail smtp server for sending emails
" Kronin555,
The mail server I'm running alongside Coldfusion is hMailServer 4.1, which
supports the Sender Policy Framework(SPF). I wonder if that is sufficient."
Nope. SPF has nothing to do with the specific capabilities of the sendmail
server involved, it has everything to do with locking down which mail servers
can send out mail "from:" a domain. (it's more complicated, because it actually
checks the envelope sender, which is the return-path in the email, but
Coldfusion sets the envelope sender to either the from: address, or the failto:
address).
[url]http://spf.pobox.com/[/url]
Gmail.com's SPF record is as follows (note it contains a ?all, which is
basically a wildcard for any other SMTP server, my guess is that will be
removed in the future which is when things would break. Until then, you could
successfully do what you originally proposed, but you're just asking for it to
break later):
v=spf1 a:mproxy.gmail.com a:rproxy.gmail.com a:wproxy.gmail.com
a:zproxy.gmail.com a:nproxy.gmail.com a:xproxy.gmail.com a:qproxy.gmail.com ?all
Kronin555 Guest
-
BKBK #5
Re: Using GMail smtp server for sending emails
>> I wonder if that is sufficient.
server involved> Nope. SPF has nothing to do with the specific capabilities of the sendmail
Thanks Kronin555,
Until yesterday, I had only a passing acquaintance with SPF. Anti-spam,
anti-phishing and
all that. I've had a read, and now fully understand everything you've said.
Strictly speaking,
Kraminator's search is purely an academic exercise. In spamming!
SPF technology is fascinating. Knowing what I now know, I'm going to turn
half-circle.
I've begun studying ways to use SPF to protect our e-mail from programmers
like me.
BKBK Guest
-
Kronin555 #6
Re: Using GMail smtp server for sending emails
"Does this access enable the inclusion of Gmail's SPF data?"
No. Emails themselves don't "include" SPF data. When an SPF-aware email server
receives an email, it does a DNS lookup on the domain of the envelope sender,
looking for an SPF record. If it finds one, then it checks the SMTP server the
email message originated from against the allowed SMTP servers listed in the
SPF record.
That said, the method you outlined uses one of the authorized gmail SMTP
servers to send the email, so emails sent using this method will pass any SPF
checks.
Kronin555 Guest
-
BKBK #7
Re: Using GMail smtp server for sending emails
When an SPF-aware email server receives an email, it does a DNS lookup on
the domain of the envelope sender, looking for an SPF record.
Indeed. Thanks. Just read about the mechanics of the process a moment ago.
That said, the method you outlined uses one of the authorized gmail SMTP
servers to send the email, so emails sent using this method will pass any SPF
checks.
Well, Kraminator, you heard what the man said. Go on, set it on 10.
BKBK Guest



Reply With Quote

