[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => macca2727 [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 7 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> CFMAIL - Coldfusion - Advanced Techniques

Professional Web Applications Themes

CFMAIL - Coldfusion - Advanced Techniques

i am trying to send all the info from a DB query to a mail adrerss using cfmail the results of the qeury is as follows workingbooker Test [email]testusernowhere.com[/email] 100.0 2005-01-27 20:02:29 overidebooker Test [email]testusernowhere.com[/email] 100.0 2005-01-27 20:08:47 overideuser Test [email]testusernowhere.com[/email] 40100.0 2005-01-27 20:14:02 bookertest Test [email]testusernowhere.com[/email] 68000.0 2005-01-27 20:00:16 overideuser Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:14:02 overideuser Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:14:02 overideuser Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:14:02 bookertest Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:00:16 bookertest Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:00:16 bookertest Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:00:16 but all it does is to send a seprate mail for all the entries... ...

  1. #1

    Default CFMAIL

    i am trying to send all the info from a DB query to a mail adrerss using cfmail

    the results of the qeury is as follows

    workingbooker Test [email]testusernowhere.com[/email] 100.0 2005-01-27 20:02:29
    overidebooker Test [email]testusernowhere.com[/email] 100.0 2005-01-27 20:08:47
    overideuser Test [email]testusernowhere.com[/email] 40100.0 2005-01-27 20:14:02
    bookertest Test [email]testusernowhere.com[/email] 68000.0 2005-01-27 20:00:16
    overideuser Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:14:02
    overideuser Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:14:02
    overideuser Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:14:02
    bookertest Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:00:16
    bookertest Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:00:16
    bookertest Test [email]testusernowhere.com[/email] 0.0 2005-01-27 20:00:16


    but all it does is to send a seprate mail for all the entries...

    i want one mail with the query results in it

    i got it to include all the data but it still send a mail for every record


    emil_Henrico Guest

  2. #2

    Default Re: CFMAIL

    Shouldn't it be something like this: <cfmail to='toaddress.com'
    from='nowheremymail.com' type='html' ...> <table> <cfoutput
    query='whatever'><tr><td>#name#</td><td>#test#</td><td>#address#</td><td>#number
    #</td><td>#date#</td></tr></cfoutput> </table> </cfmail>

    nTesla Guest

  3. Moderated Post

    Default cfmail

    Removed by Administrator
    sunloong Guest
    Moderated Post

  4. #4

    Default Re: cfmail

    The server attribute is not correct.

    server="usernamemydomain.comasswordmail.mydomain .com">

    Normally you just put in the server name itself, such as:

    server ="mail.mydomain.com"
    Abinidi Guest

  5. Moderated Post

    Default Re: cfmail

    Removed by Administrator
    sunloong Guest
    Moderated Post

  6. #6

    Default Re: cfmail

    Hi everyone,

    Found out that after changing the server attribute to
    server="127.0.0.1" it could work already.

    Thank you for those whom reply to my query.
    sunloong Guest

  7. #7

    Default cfmail

    i am using an email template, i have adapted the code, see below, is this ok if
    i am testing the locally, should it still send the email? to see if it works

    <form action = "cfmail.cfm">
    <pre>

    FROM: <input type = "Text" name = "MailFrom">
    <hr>
    MESSAGE BODY:
    <textarea name ="body" cols="40" rows="5" wrap="virtual"></textarea>
    </pre>
    <!--- establish required fields --->

    <p><input type = "Submit" name = "">
    </form>


    <cfif IsDefined("form.mailto")>
    <cfif form.mailfrom is not "">
    <cfmail to = "com.au"
    from = "#form.mailFrom#"
    subject = "web enquiry">
    </cfmail>
    </cfif>
    </cfif>

    macca2727 Guest

  8. #8

    Default Re: cfmail

    I don't see a closing pre tag, but that should be no big deal. What is a big
    deal is that you are cfif-ing a form field that is not in your form.

    So if you test that exact code, you won't send any mail.

    Originally posted by: macca2727
    i am using an email template, i have adapted the code, see below, is this ok
    if i am testing the locally, should it still send the email? to see if it works



    Dan Guest

  9. #9

    Default Re: cfmail

    all i want is a email action that sends my form with the subject set as web enquiry and set mail to my email address as

    do i need to use cfif?
    macca2727 Guest

  10. #10

    Default Re: cfmail

    For what you are doing right now,
    <cfif your cfform and cfmail tags are on the same page>
    you need cfif
    <cfelse>
    you don't
    </cfif>


    Originally posted by: macca2727
    all i want is a email action that sends my form with the subject set as web
    enquiry and set mail to my email address as

    do i need to use cfif?



    Dan Guest

  11. #11

    Default Re: cfmail

    dont understand what you mean?
    macca2727 Guest

  12. #12

    Default Re: cfmail

    Originally posted by: macca2727
    dont understand what you mean?

    This:
    <cfif your cfform and cfmail tags are on the same page>

    means if the code for your form and cfmail tags are written in the same .cfm
    file.


    Dan Guest

  13. #13

    Default Re: cfmail

    ok i understand, so if i have the form below on "enquiry.cfm", in my
    "actionenquiry.cfm" what would be the best code if i wanted to send the
    "message body" and "from" to myemail address with a subject of web enquiry?

    <form action = "cfmail.cfm">
    <pre>
    FROM: <input type = "Text" name = "MailFrom">
    <hr>
    MESSAGE BODY:
    <textarea name ="body" cols="40" rows="5" wrap="virtual"></textarea>
    </pre>
    <p><input type = "Submit" name = "">
    </form>

    macca2727 Guest

  14. #14

    Default Re: cfmail

    <cfmail to = "com.au"
    from = "#form.mailFrom#"
    subject = "web enquiry">

    #form.body#

    </cfmail>

    Dan Guest

  15. #15

    Default Re: cfmail

    ok thanks that works i think, i have set my mail.server in administrator, so this should now send emails, even if i have this site on my local machine with a internet connection?
    Craig77 Guest

Similar Threads

  1. CFMAIL in MX7
    By roundtable in forum Coldfusion Server Administration
    Replies: 0
    Last Post: October 17th, 09:08 PM
  2. CFMAIL and SPF
    By redherring in forum Macromedia ColdFusion
    Replies: 4
    Last Post: May 6th, 07:12 PM
  3. cfmail help me plz!!
    By vivaforever in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: April 19th, 02:35 PM
  4. <cfmail></cfmail> in a script
    By Greeniegirl in forum Macromedia ColdFusion
    Replies: 1
    Last Post: March 30th, 06:23 PM
  5. cfmail - Attribute validation error for tag CFMAIL.
    By CF_Hack in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: March 11th, 05:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139