Link to home
Start Free TrialLog in
Avatar of the_kid
the_kid

asked on

Inserting into Goldmine

In one of my application pages I have a registration form, and I want to set it up so that when the form is submitted and email is sent and the information is imported directly into Goldmine. Does anybody have an idea of how to do this???
Avatar of Scott Bennett
Scott Bennett
Flag of United States of America image

You will have to set up a native driver to the database with coldfusion administrator. then just use <cfquery> and SQL to updatde the goldmine database



These may be of help:

ftp://www.goldmine.com/downloads/public/manuals/GM-API.pdf

ftp://www.goldmine.com/downloads/public/manuals/dbaseexp.pdf

As for the form sending an email, on the action page use the <cfmail> tag to send the email.

here's an example of the use of <cfmail>



<CFIF IsDefined("form.mailto")>
    <CFMAIL TO="#form.mailto#"
            FROM="#form.mailFrom#"
            SUBJECT="#form.subject#">
            #form.body#
    </CFMAIL>
</CFIF>
<P>
<FORM ACTION="cfmail.cfm" METHOD="POST">
TO:         <INPUT TYPE="Text" NAME="MailTo">
FROM:        <INPUT TYPE="Text" NAME="MailFrom">
SUBJECT:    <INPUT TYPE="Text" NAME="Subject">
<hr>
MESSAGE BODY:
<TEXTAREA NAME="Body" COLS="40" ROWS="5" WRAP="VIRTUAL"></TEXTAREA>

</FORM>  


-Scott
Avatar of the_kid
the_kid

ASKER

No,

When the email is sent the data will automatically be imported into the database. What I have right now is something like this:

<cfmail

to="'{$GM-WebImport$}' <execed@duke.edu >"
from="execed-info@fuqua.duke.edu"
subject="Content-Type: application/x-gm-impdata\n ">
[Instructions]
DupCheck=Email


OnDupAttachTrack=Registration
SaveThis=Registration

[Data]
Company=#form.company_name#

etc...
Cold fusion will not send an email like this because it validates the email address first and this is an incorrect format. email addresses should be in the following format "Person@MailServer.Extention" the special characters and spaces in your to address will cause coldfusion to place the spool file in the Undelivr folder.
Eliminate the space int this part of your address and it should work:


<execed@duke.edu >

Should be

<execed@duke.edu>
Avatar of the_kid

ASKER

The email part works fine, it just isn't importing into Goldmine properly...
The following example shows and import instruction file wich contains all possible instructions.

[Instructions]
DupCheck1=Contact
DupCheck2=UserDef05
DupCheck3=cs1
OnNewSendEmail=JON, NEW, Prospect requesting information
OnDupSendEmail=AMI,,Repeated request...
OnNewAttachTrack=Web Lead
OnDupAttachTrack=100067,JON
Run=c:\goldmine\webimp.exe
SaveThis=Web import file
;ImportData=0
Password=Verify

[Data]
Company=GoldMine Software Corp.
Contact=Jon Ferrara
Phone1=310/454-6800
Address1=17383 Sunset Blvd.
City=Pacific Palisades
State=CA
Zip=90272
Source=Web Page
email=jferrara@goldminesw.com

[ContSupp]
cs1_RecType=P
cs1_Contact=Serial Number
cs1_ContSupRef=10001001
cs1_Address1=This is a test...
cs2_RecType=C
cs2_Contact=John Doe
cs2_Title=Beta Program Manager



------------------------------------------------------
For more info on this you can download the following PDF:

ftp://www.goldmine.com/public/manuals/Gm4-ref.pdf

The information you will want to look at is on pages 465-471 (448-454 if you go by the page numbers written on the document).

-Scott
if you are still having trouble then I can help you better if you can show me the syntax you are using to create the email from the <cfmail> tag to the </cfmail> tag. but basically Your goal is to create an email whose end result is syntatically equivalent to the example I gave in my last comment. Another thing to check is the password you are using is correct(if you are requireing a password). Have you seen the emails that the code you are using is producing?

-Scott
another link you can check out is:

http://kbase.goldmine.com/cgi-bin/om_isapi.dll?softpage=default

Enter "Internet Preferences", or "Emial", or the like as the keyword.
Sending an e-mail cannot automatically update a database. You must insert the records into the database yourself using the CFQUERY tag.

<cfquery datasource="mydsn">
insert into mytable (list of columns)
values(
field1 = #value1#,
field2 = #value2,
etc}
</cfquery>

Snakehollywood,

With the Goldmine product, you can write a script within an e-mail that automatically updates the database with a new contacts information. Goldmine can be set up to check an email account for emails where the "To" field has the following trigger name: "'{$GM-WebImport$}' <EmailAddress@Server.com>". what the_kid is having trouble with is dynamically generating that emial properly.

Regards,
Scott
Avatar of the_kid

ASKER

I ended up have to buy a custom tag cfx_mail2. None of the suggestions worked, and I have solved the problem on my own.
SBennett,

I think that you should have gotten some points or something for your assistance here.  A great deal of effort was put into and i think all the relevant info is there in some form or another.

Thanks for contributing to EE.

an appreciative yet less knowledge learner,
Paul.
ASKER CERTIFIED SOLUTION
Avatar of Scott Bennett
Scott Bennett
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of the_kid

ASKER

Sorry...can't give details as to exactly what the problem was as I'm not quite sure. All I know is that CFX_MAIL2 fixed it, so if anybody has to do the same thing buy this tag...
The main difference between cfmail and cfx_mail2 is the ability to create custom mail headers and to remove the "X-Mailer: Allaire Cold Fusion" mail header generated by CFMAIL, which can cause the email to be stoped by certain SPAM filters.

I think that the most likely problem is that Goldmine doesn't like the "X-Mailer: Allaire Cold Fusion" header, and therefore doesn't process the request.

cfx_mail2 is available at

http://www.fuseware.com

Regards,
Scott
sBennett, I think the real problem is that Goldmine either needs {$GM-WebImport$} in the TO line like the kid wanted or Goldmine requires a special Content-Type.  Neither of these will work with ColdFusion which I find very annoying.

From the Goldmine Help File:
Importing Contacts with WebImporting
GoldMine's Internet e-mail reader identifies data retrieved from the WebImport Gateway. GoldMine looks at the header of every e-mail message for special handling instructions.
The following example shows the special header information:

Content-Type: application/x-gm-impdata

When an e-mail message containing WebImport information is retrieved, GoldMine automatically handles the message. Alternatively, an incoming message can trigger the WebImport with the following To: line entry:

{$GM-WebImport$}

Actually it is possible now.  Construct the To line like this:

to="{$GM-WEBIMPORT$} <kurt@somewhere.com>"
Kurt,

Not sure if you noticed, but this question is over 6 years old? There are probably a ton of things different with whatever the current version of GoldMine is, and there have been a ton of changes to ColdFusion since this question was answered as well. I personally have never used goldmine, but I vaguely remember reading a lot about it when I answered this question. In current versions of ColdFusion you can use the cfmailparam tag to set the content-type to whatever you need, and you can use the mailerid attribute in the cfmail tag to control the x-mailer header as well. The CFX_Mail2 tag is probably no longer necessary.

http://livedocs.adobe.com/coldfusion/8/htmldocs/index.html

-Scott