• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cfmail using google aps servers

New Here ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

Hi I am just trying to get cfmail to send emails from my site using an account i have set up with google aps but i just won't work.

Any suggestions would be greatly appreciated, he is my code

<cfmail
to = "#Appication.ToAdminEmailForError#"
from = "#Appication.ToAdminEmailForError#"
subject = "CAPP Error Notification '#Error.Template#', '#Error.Type#'"
server = "smtp.gmail.com"
username = "123@capp.net.au"
password = "123"
port = "465"
type = "html">


<html>
<head>
<title>Error Report</title>
</head>
<body>
<b>Error.Template:</b> #Error.Template#<br>
<b>Error.Browser:</b> <span class="Black">#Error.Browser#<br>
<b>Error.Type:</b> #Error.Type#<br>
<b>Error.Remoteaddress:</b> #Error.Remoteaddress#<br>
<b>Error.HTTPReferer:</b> #Error.HTTPreferer#<br>
<b>Error.Datetime:</b> #Error.datetime#<br>
<b>URL.Parameters:</b> #Error.QueryString#<br>
</span>
<hr color="##3366cc">
<span class="Black"><b>Error.Diagnostics:</b> #Error.diagnostics#</span>
<hr color="##3366cc">
<span class="Black"><br>
<b>Error.MailTo:</b> #Error.Mailto#</span>
</body>
</html>
</cfmail>
TOPICS
Advanced techniques

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

my smtp.gmail.com is set up to use port 587...
but it is a regular gmail account, not through google aps...
and i haven't tried it with cfmail...

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

I checked googles documentation and it does say to use 465 in the instructions for setting up outlook.
the settings work fine in outlook as it sends and receives emails without any problems.

I was thinking that it could be because google accounts are on secure smtp, can cfmail send over secure smtp ??

Kris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

Thanks I checked it out but the prerequsits throw me a bit, I am not on a dedicated server and wouldn't be able to make these changes. below


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.Jar; 6. In the Coldfusion Administrator, add this to the JVM classpath: C:\CFusionMX7\Mail\secure_inet\lib\sinetfactory.Jar 7. Restart the Coldfusion MX server service. 8. Run the coldfusion script. It should go like an intercity train.

it would be great if you could just implement this code.



<cfscript>
// create new instance SSL_SMTP_obj =
CreateObject("java","com.jscape.inet.smtpssl.SmtpSsl").init("smtp.gmail.com",465
);
// address the message email_message =CreateObject("java","com.jscape.inet.email.HtmlEmailMessage");
email_message.setTo("joe@blow.com");
email_message.setFrom("me@you.com");
email_message.setSubject("Email Subject");
email_message.setHtmlBody("the body of the message");
// connect, send the message, disconnect try
{
SSL_SMTP_obj.connect();
SSL_SMTP_obj.login("your GMAIL user account","GmailPassowrd");
SSL_SMTP_obj.send(email_message);
SSL_SMTP_obj.disconnect();
}
catch(Exception e)
{
WriteOutput(e);
}
</cfscript>


Kris

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

Hi,

You can't do anything with GMail SMTP using the <cfmail> tag since gmail is using 'https' protocol which <cfmail> tag does not support..

Meanwhile you can get rid of this by using a small GNU utility named "stunnel" which acts as a ssl wrapper.. You can obtain one from www.stunnel.org

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

thanks but that is over my head i was thinking there was an easy solution but it looks as if there is not.

Thanks everyone for trying

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 17, 2007 Apr 17, 2007

Copy link to clipboard

Copied

Hi,

Make a try with this IMAP CFC perhaps you may get through your issue..

sourceforge.net/projects/cfimap-cfc/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 24, 2008 Mar 24, 2008

Copy link to clipboard

Copied

This thread is almost a year old, and I'm just encountering the problem now. Have there been any changes that make it easier to connect to Google Aps mail servers?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 24, 2008 Mar 24, 2008

Copy link to clipboard

Copied

LATEST
Hi,

It seems resolved in Coldfusion 8.. Go through this blog,

http://tacfug.org/blog/index.cfm/2007/5/30/ColdFusion-8-likes-Google-Apps

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation