markmorgan

Email URL

Post by markmorgan » Thu Sep 15, 2005 11:37 am

How do you change the template for the Email URL option on item right-click?

Mark.

User avatar
support
Site Admin
Posts: 3065
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Re: Email URL

Post by support » Thu Sep 15, 2005 12:15 pm

markmorgan wrote:How do you change the template for the Email URL option on item right-click?


Exit Awasu and open your user's config file (e.g. C:\Program Files\Awasu\Users\YOUR-NAME\config.ini) in Notepad .

You can customize the subject and message lines for the email sent by tweaking the lines that start with <i>EmailUrlBodyTemplate=</i> and <i>EmailUrlSubjectLine=</i>.

The only parameter currently available is {%URL%} which will be replaced with the feed item's URL (you must use %25 in place of % characters in this config file). You can also use \n to start a new line or \t to insert a tab character.

markmorgan

Re: Email URL

Post by markmorgan » Thu Sep 15, 2005 4:45 pm

Thanks.

I am still doing something wrong as it now says "The command line argument is not valid. Verify the switch you are using.".

Is there any limitations on the characters that can appear on the BodyTemplate? My one has "<>/=, and space

Will the next version of the software support %TITLE%, %SELTEXT% etc?

Thanks,
Mark.

User avatar
support
Site Admin
Posts: 3065
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Re: Email URL

Post by support » Thu Sep 15, 2005 5:12 pm

markmorgan wrote:Thanks.

I am still doing something wrong as it now says "The command line argument is not valid. Verify the switch you are using.".

Is there any limitations on the characters that can appear on the BodyTemplate? My one has "<>/=, and space

Will the next version of the software support %TITLE%, %SELTEXT% etc?

Thanks,
Mark.


Awasu generates a mailto: URL and tries to execute it using ShellExecute() e.g. mailto:foo@bar.com?subject=XXX&body=YYY. This means it needs to be a valid URL so you need to encode any special characters, etc.

It also means that there are length limitations (2048 characters for the whole thing, IIRC).

Awasu tries to make things safe but there may be some cases it's missing. If you post the templates you are trying to use here, I can check them out.

abwilson
Posts: 247
Joined: Sun Feb 09, 2003 12:36 am
Location: San Francisco, CA -- USA

Post by abwilson » Thu Sep 15, 2005 5:53 pm

I normally run Awasu with the items pane closed. Could/should "Email URL" appear on right-click on an item in the browser pane?

Thanks

Allan

User avatar
support
Site Admin
Posts: 3065
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Post by support » Thu Sep 15, 2005 6:22 pm

abwilson wrote:Could/should "Email URL" appear on right-click on an item in the browser pane?


Possibly. The problem is that this context menu is owned by IE and there are only a very limited number of available entries, shared amongst all applications on your PC.

abwilson
Posts: 247
Joined: Sun Feb 09, 2003 12:36 am
Location: San Francisco, CA -- USA

Post by abwilson » Thu Sep 15, 2005 7:42 pm

That does make it a bit challenging... :?

Is creating a user Tool the right alternative?

Thanks

Allan

User avatar
support
Site Admin
Posts: 3065
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Post by support » Fri Sep 16, 2005 2:57 am

abwilson wrote:Is creating a user Tool the right alternative?


Actually, that's a pretty cool idea. If you generate mailto: URL, you'd still have the same limitations that Awasu does but you could always write an small utility app that gets passed the relevant info and then launches your email client directly.

markmorgan

Re: Email URL

Post by markmorgan » Fri Sep 16, 2005 8:45 am

I converted all of the characters to HTML entities and the Email URL option now launches a blank email but cuts off the body text after the first occurence of an HTML entity or a \n.

I tried creating this as a tool

Code: Select all

mailto:foo@bar.com?subject={%TITLE%}&body={%SELTEXT%}{%URL%}

but this gives the following error message "Can't run the user tool: The system cannot find the specified file"

So I changed it to run my email client directly rather than via the mailto protocol (not particularly portable for users for other mail clients!)

Code: Select all

"C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE" -c IPM.Note /m "mailto:foo@bar.com?subject={%TITLE%}&body={%SELTEXT%}{%URL%}"


And this works!

With regard to the HTML entities I have discovered that if you just encode them in hex it works. e.g. %0D%0A for \n, %22 for &quot; etc.

So my final version looks somewhat like this

Code: Select all

OUTLOOK.EXE -c IPM.Note /m "mailto:foo@bar.com?subject=SecretSubject&body=#title%20%22{%TITLE%}%22%0D%0A<blockquote><p>{%SELTEXT%}</p></blockquote>%0D%0A<p><a%20href=%22{%URL%}%22>{%TITLE%}</a></p>

which I use for the Radio UserLand Mail-to-Weblog tool MailEdit.

Cheers,
Mark.

abwilson
Posts: 247
Joined: Sun Feb 09, 2003 12:36 am
Location: San Francisco, CA -- USA

Post by abwilson » Fri Sep 16, 2005 10:25 pm

I've been playing some with mailto:. {%TITLE%} and {%SELTEXT%} seem to work fine; however, {%URL%} never yields anything.

Does it depend on context, am I doing something wrong, or what?

Thanks

Allan

User avatar
support
Site Admin
Posts: 3065
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Post by support » Sat Sep 17, 2005 3:02 am

abwilson wrote:{%URL%} never yields anything.


{%URL%} is replaced with the URL of the current page and must start with "http" (or "https").

abwilson
Posts: 247
Joined: Sun Feb 09, 2003 12:36 am
Location: San Francisco, CA -- USA

Post by abwilson » Sat Sep 17, 2005 7:40 am

Could you give an example, please? I would like to know when and how to use it. I've seen the translation Tool, but when/where will {%URL%} be filled in?

Thanks

Allan

abwilson
Posts: 247
Joined: Sun Feb 09, 2003 12:36 am
Location: San Francisco, CA -- USA

Post by abwilson » Sat Sep 17, 2005 7:41 am

To clarify, I have successfully used {%TITLE%} and {%SELTEXT%} with mailto:, but using {%URL%} at the same time produced nothing.

User avatar
support
Site Admin
Posts: 3065
Joined: Fri Feb 07, 2003 12:48 pm
Location: Melbourne, Australia
Contact:

Post by support » Sun Sep 18, 2005 2:14 pm

abwilson wrote:I've seen the translation Tool, but when/where will {%URL%} be filled in?


When you select the "Translate page" item from the Tools menu, {%URL%} will be replaced with the URL of the current browser page.

abwilson
Posts: 247
Joined: Sun Feb 09, 2003 12:36 am
Location: San Francisco, CA -- USA

Post by abwilson » Sun Sep 18, 2005 5:19 pm

Yes, I realize that. Is "Translate Page" the only context it can be used in? Why isn't it set and usable elsewhere?

Post Reply

Return to “Awasu - General Discussion”