Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Texts and fields on emails (& PDF's)


Evergreenh
 Share

Recommended Posts

Hi there

 

Im having a little problem which I think has been raised here before, however I have to admit that I didnt understand the answer!!

 

I have two queries I suppose.

Each record I create on my DB has a unique number (its an invoice number) and I would like to send an email that turns the record into a PDF that automatically attaches that is specific to that record. I would also like to put that Invoice number in the subject title. Right now I have to create a PDF and then attach it manually to the standard email that I have created with FPro.

 

Also I would llike the message to contain a combination of text and fields from the record. I seem to be able to get either text or fields but not a combination of both.

 

I should explain that not only am I a newbie, Im a complete and utter 'not got a clue' person (its taken nearly 7 years for me to work out how to create a portal Im afraid), so if you are kind enough to answer me I think I need you to pretend that you are speaking to your Grandmother! Sorry about that!!!

 

Id really appreciate some help with this.

 

Kelly

Link to comment
Share on other sites

Easy stuff first:

 

Also I would llike the message to contain a combination of text and fields from the record. I seem to be able to get either text or fields but not a combination of both.

 

Message = "Bunch of boilerplate text"&Table::FieldName&" "&Table::AnotherField&" and blah blah some more text."

 

I haven't worked on a Windows PC to any appreciable degree since before FileMaker 7 so I'm going to pass on how to snag the PDF file unless no astute Windows-centric developer comes in to answer it.

Link to comment
Share on other sites

Oh thats lovely! Thats one bit worked out. I was using + instead of &

Now that should solve my problem with regards to getting unique field content and standard text in both the email body and email title. Thank you so much for that.

 

Anyone any ideas about how to get a unique PDF of the record to attach to the email? Right now I create the PDF, give it a unique name and store it in a file on the desktop, and then when the script continues and the email is created in Outlook Express I have to go and find the PDF and attach it manually.

 

Id really appreciate some suggestions on this.

 

Thanks in advance

smiley-smile

Link to comment
Share on other sites

If you've manually created the PDF and therefore know where it is and what it's named, you should be able to attach it automatically.

 

Well....

What I do right now is: The script is set up to create a PDF which I have to manually name and shove in a file on my desktop, and then the script goes on to create an email and I have to manually attach that PDF.

 

What I was wondering is if the PDF can be created and named automatically, perhaps using the Invoice number field, and then attached automatically to the email.

 

Each record on the database is a unique booking for an event, and each one requires a email confirmation with PDF receipt.

 

What I have realised after poking around this forum over the last 24hours is that my system for booking these events is probably quite ridiculous in its current format, and that FPro could probably step in and automate a lot of the methods.

 

Right now people click a button on my dreamweaver created website, which takes them to another ecommerce site where they fill in a form that gets emailed to me. Then they are then routed into a credit card handling company that takes their money, and I get an email confirming that as well. Then we have to manually copy and paste the information from the form relating to their booking into FPro, and then we manually enter the payment details from the other email, and then we raise the invoice and the confirmation in the way I described above.

 

Im trying to at least remove one step from this long-winded process.

Link to comment
Share on other sites

If you can get a line on where it saves the file to — the path — then you can have the script rename it for you.

 

To rename the file, use Send Message to (....sorry, have to scrape the rust spots off, I haven't done Windows very much lately...) Cmd and tell it to rename the file.

 

Set Variable [$qmk, \]

Set Variable [$Bks, \\]

Set Variable [$RenameCmd, "cmd /c rename " & $qmk & "C:&$Bks&"Documents and Settings"&$Bks&"Evergreenh"&$Bks&"Desktop"&$Bks&"ExampleFile.pdf"&$qmk&" "&$qmk&Table::Invoice Number&".pdf"&$qmk

 

 

Comment [that shoud output something akin to:

--------------------------------------------

cmd /c rename "C:\Documents and Settings\Evergreenh\Desktop\ExampleFile.pdf" "31705.pdf"]

 

Send Message [open document/application, $RenameCmd

 

 

 

 

Unfortunately, the Attach File / Specify File dialogs don't seem to accept formulas :(

 

Now if you could do it from a Mac, you could use AppleScript. You know, tell the application Finder, activate, set document "31705.pdf" to TheAttachment, end tell, tell YourEmailApp, send current email with attachment TheAttachment, end tell.... or something like that...

Link to comment
Share on other sites

Eeeek!! I think you lost me good and proper on that one.

 

Can I be really cheeky and ask another question????

 

What about putting HTML into emails sent via PFro? I downloaded a trial for SMPTit_Pro and currently have it staring at me. Im wondering if I can create an email that has HTML in it that creates a button but uses field contents to define the target of that button?

 

Im not sure how a plug in works in FPro. I assumed that I would find additional commands when I wrote a script as usual but perhaps thats not the case.

Link to comment
Share on other sites

HTML in emails is an abomination in the eyes of God. And if you use it you will have a goodly portion of your emails spam-filtered into oblivion, and a double handful of the rest manually deleted because the recipient has, quite sensibly, configured their email program to NOT interpret HTML, making your email look like a catnip-crazed Siamese made its tail-chasing way across your keyboard.

 

HTML email is used heavily by spammers and refugees from AOL chat rooms. It is widely used by the former to register valid email addresses (by referencing a nonexistent image that contains your emailstring in the phony image path, which is logged by the fileserver from which they can then obtain a list of valid emails to send spam to). It is widely used by the latter to put lurid "stationery" and horrid fonts in their LOLograms. It is widely used by both to shove flashing & blinking images, gaudy graphics, and other visual crap into the world of email.

 

Oh, and it can represent an opening through which exploits can foul up your OS and your network: you would not get loads of sympathy if you browsed to an XXX porno site and got spywared up, but how about when the spam you receive and accidentally open has the same kind of code on it? Not saying the security issues can't be addressed through other means, but it's easier to just turn HTML rendering off, and so many people do.

Link to comment
Share on other sites

Oh, and yeah, SMTPit Pro should allow you to use a calculation to specify file attachment.

 

They should have a user's guide to deploying it. But in the ScriptMaker, try making a Set Variable statement and click where it says specify and then examine "External Functions" in the upper right available-functions window.

Link to comment
Share on other sites

Thank you so much for all your advice, it is very much appreciated.

 

The HTML thing is just that I want to put a 'Pay now' button in some of the emails where the client has booked via the phone rather than the website.

 

I'll leave you in peace now, but thanks again!!!!

 

Kelly

X

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use