Sending emails from within DB

Sending emails from within DB

Post by Marie Gilber » Fri, 24 Mar 2000 04:00:00



I have a file called Contacts.  In this file is a field called Email
Addresses, which contain, surprise surprise, email addresses.  I'd like
for the user to be able to click on the address in question (make it a
"button) and send an email.  I have over 100 records in this file, set
up in View as List.  I was able to set  up emailing to me via a script
which sends an email to one particular address (called "email Marie")
but do I have to set up 100 scripts, one for each address? Yuck!

Thanks!!

 
 
 

Sending emails from within DB

Post by Jim Krame » Fri, 24 Mar 2000 04:00:00



Quote:> I have a file called Contacts.  In this file is a field called Email
> Addresses, which contain, surprise surprise, email addresses.  I'd like
> for the user to be able to click on the address in question (make it a
> "button) and send an email.  I have over 100 records in this file, set
> up in View as List.  I was able to set  up emailing to me via a script
> which sends an email to one particular address (called "email Marie")
> but do I have to set up 100 scripts, one for each address? Yuck!

> Thanks!!

Marie,

You can do this with a simple loop on a Found Set (or your whole file - I
would test it first on a reasonable sub set of records.)

Go to Record/Request/Page [First]
Loop
    Send Mail [No Dialog, "YourMessage"]
    Go to Record/Request/Page [Next, Exit After Last]
End Loop

In the Specify Mail dialog box (for the Send Mail Script Step), set the "To"
value to a Field value (in this case your Email Addresses field), set the
Subject to text or use a global field, and set the Message (YourMessage
above) to Text or use a globle field.

This is fairly easy to set up (and no Yucks! are required.)

Jim


 
 
 

Sending emails from within DB

Post by Blaine Bonna » Sat, 25 Mar 2000 04:00:00




Quote:> I have a file called Contacts.  In this file is a field called Email
> Addresses, which contain, surprise surprise, email addresses.  I'd like
> for the user to be able to click on the address in question (make it a
> "button) and send an email.  I have over 100 records in this file, set
> up in View as List.  I was able to set  up emailing to me via a script
> which sends an email to one particular address (called "email Marie")
> but do I have to set up 100 scripts, one for each address? Yuck!

> Thanks!!

Select Email Addresses for the To: field when you choose Send Mail from the
script list. You have several options for each portion of the email
components.

This will allow you to send an email to each individual address.

 
 
 

1. sending an email from within an SP

The following SP adds a record to a table.  I want to then send an email from
within this SP to notify someone that their login is blocked.  I can get their
email address easily with a simple select but how does the xp_sendmail procedure
actually fit in ??  I've tried adding it in just before the raiserror part but it
doesn't work ?  The raiserror part is used to trigger an alert to notify me but i
need to also notify the client.  Can anyone see what  i am doing wrong please.  
Many thanks.

CREATE     PROCEDURE usp_log_BlockedLogin_ins

AS

BEGIN



INSERT into tbl_Login_Audit_Trail
        (
        fi_LoginID,
        fs_IP_Address,
        fd_DateTime,
        fb_Blocked,
        fs_Failed_LoginName,
        fs_Failed_Password,
        fb_FailedAttempt
        )

VALUES
        (


        current_timestamp,
        1,
        NULL,

        1
        )
END

BEGIN
        RAISERROR (50001,10,1) WITH LOG   -- this is used to trigger an alert
END
GO

2. SQL 2000 Edition Required for Clustering?

3. Sending Emails Within FMP 4.1

4. Why DELPHI/Pascal

5. Sending email within Access2000

6. Sync task ain't happening

7. Sending email from within UniData/NT

8. Approach Users Mailing List FAQ

9. send email from within Universe

10. Getting Accounts Data out of an SQL DB and sending it via email

11. Send emails to all email addresses on my database

12. Can you use SQL to receive emails and send automated reply emails

13. An attempt was made to send an email when no email session has been established