User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 428,578 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,676 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser: Programming Forums
Views: 3150 | Replies: 7
Reply
Join Date: Apr 2007
Posts: 28
Reputation: lafalot is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
lafalot lafalot is offline Offline
Light Poster

Cfmail problem when sending to yahoo recipients

  #1  
Apr 27th, 2007
Hi,

I've set up a "Send Page to Friend" function using a script that I donwloaded.

It works fine if I use my email as the recipient address, but I receive the following error when I try to send it to a Yahoo address:

Invalid Addresses; nested exception is: class javax.mail.SendFailedException: 550 5.7.1 <blahblah@yahoo.com>... Relaying denied. IP name lookup failed

I'm able to send a regular email to Yahoo through our mail server, so I'm wondering if the error is coming from the Yahoo mail server because I'm submitting a form? Is there a better way to create a "send page to friend" function other than cfmail?

Thank you!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2007
Posts: 28
Reputation: cfAllie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cfAllie cfAllie is offline Offline
Light Poster

Re: Cfmail problem when sending to yahoo recipients

  #2  
Apr 28th, 2007
What sender address are you using? It sounds like its being rejected, possibly as an anti-spam measure. Though I don't know if its from your mail server or from yahoo. Check their faq's http://help.yahoo.com/l/us/yahoo/mai...basics-55.html

Personally I use a regular <a href="mailto:..."> link instead of cfmail. I'd rather emails are sent through the user's email client instead of my mail server. That way I don't have to worry about rejected emails or people sending spam through my application. The disadvantage of using "mailto:" is that the user cannot send email unless they have a web client like outlook, etc installed.
Last edited by cfAllie : Apr 28th, 2007 at 12:04 am. Reason: formatting
Reply With Quote  
Join Date: Apr 2007
Posts: 28
Reputation: lafalot is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
lafalot lafalot is offline Offline
Light Poster

Re: Cfmail problem when sending to yahoo recipients

  #3  
May 1st, 2007
I agree with you, CFAllie. But now I have another problem! When I try to include the URL, including a query string, in the body of the message, it won't include anything with ? or &. I tried setting the variable for the link and then including the variable in the body, but it doesn't work for me.

Thanks!
Reply With Quote  
Join Date: Mar 2007
Posts: 28
Reputation: cfAllie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cfAllie cfAllie is offline Offline
Light Poster

Re: Cfmail problem when sending to yahoo recipients

  #4  
May 2nd, 2007
I'm not sure exactly how you're coding it. You might look into the JSStringFormat() function.

Also check google for tips on obscuring/generating mailto: links to prevent harvesting /spamming.
Reply With Quote  
Join Date: Apr 2007
Posts: 28
Reputation: lafalot is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
lafalot lafalot is offline Offline
Light Poster

Re: Cfmail problem when sending to yahoo recipients

  #5  
May 3rd, 2007
Hi,

Thanks for all your good advice. I've given up on the query string part. We're just going to email from pages without query strings.

Here's the code:
<CFSET pagename = cgi.script_name>
<cfoutput>
<a href="mailto:?subject=Look at this information on #variable.blahblah# &body=http://www.#pagename#">Send this page to a friend</a>
</cfoutput>

Do I need to worry about harvesting /spamming if the mailto: is blank?

Thanks again!
Reply With Quote  
Join Date: Mar 2007
Posts: 28
Reputation: cfAllie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cfAllie cfAllie is offline Offline
Light Poster

Re: Cfmail problem when sending to yahoo recipients

  #6  
May 3rd, 2007
I didn't test it but I think something like this should work

<cfset blahblah = "whatever site" />
<cfset subjectText = "Look at this information on #blahblah#" />
<cfset linkText = "http://www.domain.com#cgi.script_name#">
<cfif len(cgi.query_string)>
    <cfset linkText = linkText &"?"& URLEncodedFormat(cgi.query_string) />
</cfif>

<cfoutput>
<a href="mailto:?subject=#subjectText#&body=#linkText#">Send this page to a friend</a>
</cfoutput>


A blank mailto: is good. Harvesting/spam are only an issue if the mailto: contains a real email address.
Reply With Quote  
Join Date: Apr 2007
Posts: 28
Reputation: lafalot is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
lafalot lafalot is offline Offline
Light Poster

Re: Cfmail problem when sending to yahoo recipients

  #7  
May 14th, 2007
So that worked great...until my coworker tried to open the link with Lotus Notes! Apparently, the body turns up in the subject line. Any other alternatives that you know of?

Thanks you!
Reply With Quote  
Join Date: Mar 2007
Posts: 28
Reputation: cfAllie is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cfAllie cfAllie is offline Offline
Light Poster

Re: Cfmail problem when sending to yahoo recipients

  #8  
May 14th, 2007
Google turned up a lot of issues with mailto and Lotus notes, primarily character limitations.

http://www.thescripts.com/forum/thread154837.html
http://www-1.ibm.com/support/docview...id=swg1LO07827

Unfortunately, the only 100% foolproof way I know of is to use your original idea (cfmail).
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ColdFusion Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 11:26 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC