Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic email problem

Status
Not open for further replies.

leadman

Programmer
Jun 11, 2001
177
US
i have a template that uses cfmail tag to send to an address that was passed from a form field - but it wasnt working. my host - awwm.com - says "The way the server is set up now it will not allow this. This was to stop spamming" - and told me to go to either of these addresses to see about a work around:

One link is bad and the other has something a little over my head. Has anyone run into this problem that can help me?
 
Hey leadman,

I think the translation is that their mail server isn't configured to relay ALL mail generated from the CF server. I took a quick look (real quick) and it didn't appear that those pages were targeted at any specific mail server issues.

Based on the fact that your ISP says that "spamming" is the reason, that almost certainly means the mail server is configured to reject mail from sources it can't trust. Since your visitors are providing the "sender" e-mail address, this means that the mail server is being asked to send mail from an unknown user. It will likely accept mail from you since your ISP knows your domain and has probably configured the mail server to accept it from your domain.

In any case, there isn't anything you can do if the mail server is not set to allow ALL mail from the CF server. We're an ISP providing CF hosting and this is an issue we had to deal with at one point. We have ours setup so that any e-mail originating from the CF server will be accepted regardless of address. This allows our CF developers to do what you're doing. There is a potential for abuse in that someone could use your form to send a bunch of e-mails but the likelyhood is slim and we watch things carefully.

I don't think there is anything you'll be able to do unless your ISP can provide more specifics on how they reject mail.

Good luck,
GJ
 
thanks for the info GunJack - so if they reject emails then how would we send confirmation emails to people when they purchase something at our site?! A very common thing..
 
Hey leadman,

I was under the impression that in this case the "from" address was the address of the visitor while your confirmation e-mails would have the "from" address set to "something@yourDomain.com" where "yourDomain.com" is recognized by the mail server.

If both situations involve e-mail originating from your domain, you should be able to make them work.

Just let me know if I misunderstood,
GJ
 
sorry, i wasnt clear. Any emails generated by this template would have our email address as the FROM. The email TO would come from the info entered into the form by the user. I tried to test the system with the following template (the from is our domain email, the TO is my yahoo email - -it didn't work:
<body>
<cfmail to=&quot;rozzigraphics@yahoo.com&quot;
from=&quot;webmaster@christiancatalogchat.com&quot;
subject=&quot;test email&quot;>
This is simply a test
</cfmail>

</body>
 
Hey leadman,

Can you post the code that you have which currently works? I'd like to see the difference as I can't imagine why one would work and the other wouldn't.

GJ
 
this is my first shot at generating mail with the CFMAIL tag (on any server). Im afraid i dont have any examples of success yet - are you suggesting that the above code should work? Regardless of spamming issues?
 
There shouldn't be any difference between the two so if one doesn't work, the other one shouldn't either. I took a second look at those pages and If my assumptions are correct about the .asp e-mailer, they may be telling you that they don't support the <cfmail> tag since it must use a mail server for delivery. The .asp objects may have built in support for mail transport and may not need the external mail server. This means your mail scripts may have to be written using the MS CDonts package. Here's a piece of untested code that might work for you if they have CDonts installed. CDonts is the standard MS e-mail component for .asp and is probably available on your server.

<cfobject
type=&quot;com&quot;
action=&quot;create&quot;
name=&quot;myEmail&quot;
class=&quot;CDONTS.Newmail&quot;
>

<cfset myEmail = myEmail.Subject=&quot;My Subject&quot;>
<cfset myEmail = myEmail.To=&quot;recipient@email.address&quot;>
<cfset myEmail = myEmail.From=&quot;sender@address.com&quot;>
<cfset myEmail = myEmail.Body=&quot;This is my message&quot;>
<cfset myEmail = myEmail.send>

If you don't want to use this, you may have to find a CF host that supports the <cfmail> tag. Any host that basically told you to go look at external links to get your e-mail working isn't providing you with adequate support though IMO. I would expect a little more help in getting such an important part of CF working.

<shameLessPlug>We of course provide this with our CF hosting :)</shameLessPlug>

Hope this helps and let me know if that code works for you,
GJ
 
hmmm - id like to know more about your hosting please.....
 
Hey leadman,

You can drop me an e-mail at GunJack@atlbiz.com and I'll send you some information. There are a few regular members in the CF forums who host with us and I'm sure they'll be happy to provide a reference.

GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top