Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    7
    Rep Power
    0

    ColdFusion Send Email Simple problem


    Hi All

    I am having problems sending an email via coldFusion. Does anyone know how to send an email so that it actually arrives at the destination? What settings are required.

    Many thanks

    Dave
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    4
    Rep Power
    0
    You use the cfmail tag dude.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    7
    Rep Power
    0
    Hi

    Thanks for that, do you have any example code for me to look at?

    Thanks

    D
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    16
    Rep Power
    0
    Originally Posted by davethomas1972
    Hi

    Thanks for that, do you have any example code for me to look at?

    Thanks

    D
    Create a page called email.cfm
    Code:
    <cfmail to="email@domain.com"
    	from="email@domain.com"
    	subject="This is a test subject"
    	type="text">
    	Hello Test
    
    	This is the body Text
    
    	Best wishes
                  xx
    </cfmail>
    <cfoutput>
    	<p>Mail sent</p>
    </cfoutput>
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    16
    Rep Power
    0
    Sorry forgot to mention: Change the code to match the email addresses you want to use then Hit the email.cfm page you created above in a browser.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    7
    Rep Power
    0
    Hi

    I have done this but am not receiving the emails, any ideas?

    Thanks
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    16
    Rep Power
    0
    Are you using a shared hosting plan or a dedicated server?
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    7
    Rep Power
    0
    Dedicated Server.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    16
    Rep Power
    0
    You need to login to coldFusion administrator and setup your email settings, do as follows:

    Goto the administrator and setup as follows:

    Mail Server: localhost
    Server Port: 25

    "Verify Mail Server Connection - when checked, verifies that ColdFusion can connect to the mail server when the "Submit Changes" button is clicked."

    Click save and hopefully this will work, let us know if this worked?
  18. #10
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    16
    Rep Power
    0
    Why dont you ask your hosting provider to help you out. I work for a provider called Hyve and we would help you through this.
  20. #11
  21. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,263
    Rep Power
    968
    Setting up the server to interact with a mail server and sending email is pretty thoroughly covered in the documentation. http://tinyurl.com/74tmdwr

    Originally Posted by davethomas1972
    I have done this but am not receiving the emails, any ideas?
  22. #12
  23. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    7
    Rep Power
    0
    Thanks for that, I asked my hosting company to help me out but they said I need a management contract! Very usefull.... not.

    Anyway ive now setup the code to send out the email by following the instructions
    Code:
    <cfmail to="email@domain.com"
    	from="email@domain.com"
    	subject="This is a test subject"
    	type="text">
    	Hello Test
    
    	This is the body Text
    
    	Best wishes
                  xx
    </cfmail>
    <cfoutput>
    	<p>Mail sent</p>
    </cfoutput>
    and I am getting the "Mail sent" message however I am not getting the email sent to me into my inbox

    Thanks guys for your help. I checked the co0ldFusion docs as recommended and its a bit complex for my skills

    Thanks again

    Dave
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    7
    Rep Power
    0
    ok
  26. #14
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    16
    Rep Power
    0
    I will ask around and see what could be the problem here, definitely ask your host about this one.
  28. #15
  29. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    London
    Posts
    16
    Rep Power
    0
    Ok i asked around for you, the problem could be you dont have a PTR setup on your servers IP/domain and your email is going to Spam or being blocked.

    A PTR allows the mail server receiving the email to check what domain is associated with the IP address that sent the email and thus check that the email is not in fact spam.

    Ask your host to setup one for you and hopefully this is the issue
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo