sending a email

chavalis
Posts: 19
Joined: Thu Dec 27, 2001 12:47 am

sending a email

Post by chavalis »

Hi

I want to send an email on a click of a button?

The code is written in vortex.

Regards
Sridhar
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

sending a email

Post by John »

If you are using Unix the easiest thing to do it to
<exec /usr/lib/sendmail -t>
Message Including headers
</exec>
John Turnbull
Thunderstone Software
chavalis
Posts: 19
Joined: Thu Dec 27, 2001 12:47 am

sending a email

Post by chavalis »

can you give an example for this
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

sending a email

Post by John »

<exec /usr/lib/sendmail -t>
To: user@domain
From: sender@domain
Subject: Email message

This is the body of the email.
</exec>
John Turnbull
Thunderstone Software
rajesh11
Posts: 52
Joined: Fri Dec 16, 2005 7:41 am

sending a email

Post by rajesh11 »

How can i send HTML mail instead of text i tried:

<exec BKGND TOFILE="-" /usr/lib/sendmail -t>
To: rajesh@xicom.biz
From: lcaol@xicom.biz
Subject: Test Mail
Content-type: text/html
This is the <b>body</b> of test email.
</exec>

not working
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

sending a email

Post by mark »

That should work if you put a blank line between the last header the body of the message. If it doesn't you need to find out why your mail reader doesn't like it.
rajesh11
Posts: 52
Joined: Fri Dec 16, 2005 7:41 am

sending a email

Post by rajesh11 »

<strfmt "<a href=%s><B>%s</B></a><br><font size=-1><font color=#6f6f6f><b> %s &nbsp;-</b></font><b>%s<nobr></nobr></b></font><br>%s <b>...</b></font><br><br>" $MUrl $MStoryTitle $MSiteName $time $dabstract><$mailbody=$ret>
<sendEmail to=$email from="admin@local.fi" mailsubject=$mailsubject mailbody=$mailbody>

while sendEmail function is

<a name=sendEmail to from="admin@local.fi" mailsubject mailbody>
<exec /usr/lib/sendmail -t>
To: $to
From: $from
Subject:$mailsubject
Content-type: text/html
$mailbody
</exec>
</a>

it's giving me email like

<a href=http://www.espoo.fi/default.asp?path=1; ... >Kulttuuri - Espoon kaupunki</B></a><br><font size=-1><font color=#6f6f6f><b> &nbsp;-</b></font><b> 8 hr, 44 mins ago <nobr></nobr></b></font><br> På svenska In English Palveluhakemisto Yhteystiedot Tarkenna <B>Espoon</B> palvelut Kulttuuri Aluekohtaiset kulttuuripalvelut Avustukset Elokuva Esitys-, harjoitus- ja <b>...</b></font><br><br><a href=http://www.espoo.fi/default.asp?path=1; ... >Kulttuuri - Espoon kaupunki</B></a><br><font size=-1><font color=#6f6f6f><b> &nbsp;-</b></font>.....

Please help
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

sending a email

Post by John »

You probably want <fmt %s $mailbody> to make sure it is not HTML encoded.
John Turnbull
Thunderstone Software
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

sending a email

Post by mark »

And add a blank line between the last header and content.

<exec /usr/lib/sendmail -t>
To: $to
From: $from
Subject: $mailsubject
Content-type: text/html

<fmt "%s" $mailbody>
</exec>
</a>
josmani
Posts: 53
Joined: Tue Jun 03, 2003 3:38 am

sending a email

Post by josmani »

I used this script to send email messages, but it seems that it does not accept Unicode in the subject line. Is there a way to send the subject in Unicode?

Thanks
Post Reply