Page Index Toggle Pages: [1] 2 3  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) @SendMail() (Read 5134 times)
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
@SendMail()
Feb 18th, 2004 at 9:29pm
Print Post Print Post  
Has anyone in the Forum used this function in an application?

I am studying this now.

Just curious on how it has worked for users in any applications?

I appreciate any of your comments.

Regards,

Dave Costanzo
  
Back to top
 
IP Logged
 
GJK
Junior Member
**
Offline


Felix qui potuit rerum
cognoscere causas

Posts: 80
Location: Kankakee. Il
Joined: Apr 22nd, 2003
Re: @SendMail()
Reply #1 - Feb 18th, 2004 at 10:00pm
Print Post Print Post  
Hammer set up a database example with that function in it when we were Betatesting. If you ask nicely maybe she will make it available to you. GK..

PS: It was in an earlier version of SES. so I don't know if it is compatible.
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @SendMail()
Reply #2 - Feb 18th, 2004 at 10:19pm
Print Post Print Post  
Quote:
Just curious on how it has worked for users in any applications?



Dave,

I have experimented with using the @sendmail command with a command button. In my first attempt I was sending the information to static (pre-set) e-mail address but the data sent was specific to elements in the record. My goal was to quickly notify a remote satellite office that was not directly attached to the network that a patient would be walking in shortly.

The basic flow was that a patient would call a central call center from there home or Drs Office. The rep on the phone would collect the necessary information and schedule the patient at a specific location. The rep would press the command button and based on the facility location element an e-mail was generated to that location with the patient data and all necessary information. By the time the patient could hang up the phone and drive to the location the office was already aware of there arrival with all the needed patient data.

My second attempt was to create a method of quickly notifying numerous people of a particular situation. Basically when a clinician has a serious problem they would call a central help desk. The information is taken and the call center person would enter data into a notes element. When the call center rep pressed the command button it would generate an e-mail for many different people notifying them to an immediate problem. In the time it takes to call one person and bring them up to speed many many people could be notified and speed the response time. I was even able to notify some people by fax by setting up an account with EFAX.com and adding the efax account to my @sendmail code. When the efax received the email it converted it to a fax and sent it instantaneously.

I was pretty much successful at getting all this to work. It still needs lots of clean up and I am sure numerous improvements. I was just trying to prove the concept before I got to deep into the specifics or mentioned this to anyone else.

At the moment this on the sideline because I keep breaking things in my application and I am not sure if it is my programming skills or the form subform bug. I am just working on learning and building separate features and will draw upon pieces from each when updated versions of Sesame become available.

Like I have said before, It seems there are plenty of neat features for me to learn in Sesame to keep me busy while I am waiting for the bug fixes to become available.

I Hope this was not to long of an answer to  your question.  Smiley
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @SendMail()
Reply #3 - Feb 18th, 2004 at 10:56pm
Print Post Print Post  
Quote:
Hammer set up a database example with that function in it when we were Betatesting. If you ask nicely maybe she will make it available to you. GK..

PS: It was in an earlier version of SES. so I don't know if it is compatible.


The app itself is an old version, but here is the code itself. It was attached to a command button. The program refers to a element called Select Standard Email. This was a combo box offering a choices of messages to send.
Code
Select All
 ** PROGRAMMING SECTION: [Send Email] [On Field Entry] **

var vMsg as String
var vSelected as String
var vSuccess as Int

If(Email = "") Then
{
 @MsgBox("Please enter an email address.","","")
 GoTo Email
}
else
{
 vMsg = ""
 vSelected = Select Standard EMail
 If(vSelected = "Past Due") Then vMsg = "Your account is past due!"
 Else If(vSelected = "Welcome") Then vMsg = "Welcome to our group!"
 Else If(vSelected = "Cancel Account") Then vMsg = "Your account has been cancelled."
 If(vMsg = "") Then
 {
  @MsgBox("Please select a standard email message.","","")
 }
 Else
 {
  If(@AskUser("Send Email Now?", "", "")) Then
  {
   vSuccess = @sendmail("mail.outgoing_mail_server.com", vSelected, "my_name@my_site.com", Email, "", "", vMsg)
  }
  If(vSuccess <> 0) Then
  {
   @MsgBox("Failed to send email!", "", "")
  }
 }
}  

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
dcostanzo
Junior Member
Members
**
Offline


No personal text

Posts: 58
Joined: Mar 13th, 2003
Re: @SendMail()
Reply #4 - Feb 19th, 2004 at 5:29pm
Print Post Print Post  
Bob

No.. not long of an answer at all..Thank you  for taking time to write this up and listing some usage examples.  What you have done is very impressive and helps me understand this function and capabilities further.  

It gives me some ideas on how I could apply this function within the confines my existing databases for the company I work for.

I particularly think I could apply this function on some similar tasks with regards to
notifications or confirmations. A very useful communication tool for this world of emails we live in. It seems to be very versatile.

I will attempt  to build a very basic @SendMail() and give it a  test run. I am really starting to like the ability to work in Designer while everyone else is banging away in Sesame.

Regards,   Dave Costanzo

GLK   Thanks for the tip  with Hammer. He's listening and  a response.-ya!

Hammer   you are so kind.   It is very nice of you to share this code.  Thank you for this and your support.

I will see how I can apply this.  

Regards,

Dave Costanzo
  
Back to top
 
IP Logged
 
Dnolan
Member
*
Offline


No personal text

Posts: 20
Joined: Feb 27th, 2004
Re: @SendMail()
Reply #5 - Feb 27th, 2004 at 6:02pm
Print Post Print Post  
Can anyone give me a programming code where I can click on the E-Mail and it will automatically launch an e-mail through Microsoft Outlook? I need this desperately! It would be great if someone could help here. Thanks!
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @SendMail()
Reply #6 - Feb 27th, 2004 at 6:38pm
Print Post Print Post  
You'd need to use @Shell to launch Outlook yourself with whatever parameters it will accept. The specific command line depends on which version of Outlook or Outlook Express you have. The startup switches should be listed in the Help for Outlook.

@SendMail sends mail directly. It does not launch or use any particular external mail program.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: @SendMail()
Reply #7 - Mar 7th, 2004 at 12:31am
Print Post Print Post  
Dont we need to enter our Password somewhere? Does this feature work with both Dial-up and Lan internet connections (POP3 and SMTP).

I just kee getting the "Mail could not be sent" error message.

The manual seems a bit vague on this subject.

Thanks,
Steve in Texas
  
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: @SendMail()
Reply #8 - Mar 7th, 2004 at 7:55am
Print Post Print Post  
Hello Dnolan .......  You asked:
Quote:
Can anyone give me a programming code where I can click on the E-Mail and it will automatically launch an e-mail through Microsoft Outlook? I need this desperately! It would be great if someone could help here. Thanks!

There are a number of Outlook items that can be created with @Shell.
The basic syntax for Outlook with command switches is:
"FullPath\Outlook.exe /c ipm.class"

The acceptable ipm classes for Outlook objects are:
Mail: ipm.note /m recipient(;s)
Calendar: ipm.appointment
Tasks: ipm.task
Contacts: ipm.contact
Journal: ipm.activity
Discussion: ipm.post
Sticky Notes: ipm.stickynote

Note that there is a space between /m and the recipient(;s)

An example of an Outlook email with two recipients:
Quote:
var n as Int
n = @SHELL(@CHR(34) + "C:\Program Files\Microsoft Office\Office\outlook.exe" + @CHR(34) + " /c ipm.note /m recipient1@myplace.com;recipient2@yourplace.com")
or
Quote:
var n as Int
var vRecipient as String =  "recipient1@myplace.com;recipient2@yourplace.com"

n = @SHELL(@CHR(34) + "C:\Program Files\Microsoft Office\Office\outlook.exe" + @CHR(34) + " /c ipm.note /m " + vRecipient)   


An example of an Outlook email  using a field value as a variable for the recipient:
Quote:
var n as Int
var vRecipient as String

vRecipient = Addressee
n = @SHELL(@CHR(34) + "C:\Program Files\Microsoft Office\Office\outlook.exe" + @CHR(34) + " /c ipm.note /m " + vRecipient)


An example of an Calendar Appointment:
Quote:
var n as Int
n = @SHELL("@CHR(34) + "C:\Program Files\Microsoft Office\Office\outlook.exe" + @CHR(34) + " /c ipm.appointment")


This command string will open up an instance of the Outlook object which you can fill in, and Save and Close. These commands can be used from any program (including versions of Q&A, and even in DOS batch files.

I believe that this will work with mulitple versions of Outlook.  Also, note that Outlook is not the same as Outlook Express which has a totally different syntax
================================
(Note - edited on 3/7/04, RMH: The examples above replace the original entries which had incorrect syntax).  See additional information on 3/7/04 posting.
« Last Edit: May 7th, 2004 at 8:45pm by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @SendMail()
Reply #9 - Mar 7th, 2004 at 12:54pm
Print Post Print Post  
Quote:
Dont we need to enter our Password somewhere? Does this feature work with both Dial-up and Lan internet connections (POP3 and SMTP).

I just kee getting the "Mail could not be sent" error message.

The manual seems a bit vague on this subject.

Thanks,
Steve in Texas


Pop is for receiving mail. You will want to use the same mail server that you use to ordinarily send mail, the so-called "outgoing server" or "SMTP server". The SMTP protocol does not require a password, but checks your IP address to make sure you are sending from an allowed client. Sendmail will work with any kind of internet connection.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: @SendMail()
Reply #10 - Mar 7th, 2004 at 3:25pm
Print Post Print Post  
Thanks for the replys!

Bob, do you know how to automatically attach a file to an outgoing email?

I want Sesame to automatically email an exported text file at the end of each day, with little, to no, entry from the user.

Thanks again!

Steve in texas
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @SendMail()
Reply #11 - Mar 7th, 2004 at 3:36pm
Print Post Print Post  
@SendMail does not have attachment capability at this time.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: @SendMail()
Reply #12 - Mar 7th, 2004 at 3:46pm
Print Post Print Post  
Steve,

Instead of attachment, you may receive the whole exported file as a content of e-mail and I believe this will serve the same purpose. Since it is done automatically, there is no entry from the user. You may save the content in the text file and import into your application.
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: @SendMail()
Reply #13 - Mar 7th, 2004 at 3:48pm
Print Post Print Post  
Thats an interesting idea Bharat.

So the body of the email would be the data from the .txt file?

Can you give me an example of how to program this? It would be a good addtion to the "program examples" section on this forum.

Thanks!

Steve in Texas
  
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: @SendMail()
Reply #14 - Mar 7th, 2004 at 3:54pm
Print Post Print Post  
Steve,

This is already there in appendix 2 - Advanced Programming examples on page 198 of programming guide namely Importing records using programming only. I believe that is what you are looking for.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send Topic Send Topic Print Print