Send Email after Insert Record

I am by no means a coder so please be gental. I have a
contact page that I have insert into a database, but I am also
trying to send an email after it inserts into the db. But I cant
seem how to make it work. Dreamweaver wrote the code for the insert
and I am not sure were to go from here. I am using asp vb.
thnaks

On 11 Mar 2007 in macromedia.dreamweaver.appdev, jeremy12345
wrote:
> I am by no means a coder so please be gental. I have a
contact page
> that I have insert into a database, but I am also trying
to send an
> email after it inserts into the db. But I cant seem how
to make it
> work. Dreamweaver wrote the code for the insert and I am
not sure
> were to go from here. I am using asp vb.
See all those Request.Form("nameSuffix") and similar? They
contain the
information posted from the form, and are still available to
you after
the database has been populated.
What you need to do:
- Find out from your hosting provider what mail component(s)
are
available on your server.
- Create an email using the information from the form:
<%
DIM MyEMailBody, MyEMail
MyEMailBody = "Name: " & Request.Form("nameFirst") &
MyEMailBody = MyEMailBody & Request.Form("nameMiddle")
MyEMailBody = MyEMailBody & Request.Form("nameLast")
& VBCrLf
' VBCrLf is a CarriageReturn/LineFeed (ie a new line)
' Details Below will vary depending on the mailer component
MyEMail = CreateObject("CDONTS.NewMail")
MyEMail.From = "[email protected]"
MyEMail.To = "[email protected]"
MyEMail.Subject = "Inserted Record"
MyEMail.Body = MyEMailBody
' Send the email
MyEMail.Send
' Get rid of the email on the server
SET MyEMail = nothing
%>
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/email.php

Similar Messages

  • Can't send email after 3.0 upgrade

    I can receive but not send email after the 3.0 upgrade. Also, the stock and weather buttons never update.
    Email is my important issue. Any ideas?

    Yeah, I put that in the title so hopefully people would see it right off the bat. I've been in the forum, looking at threads since the update to see if I'm the only one, and seem to be. I know tons of people are seeing problems with yahoo pushing email, but that's less of a concern to me at this point. And the fact that it worked just fine until this update tells me Apple broke it with their update. Surely I'm not the only person. And switching to gmail is not a good option for me. First of all, I hate gmail. Second of all, the sbcglobal account is my main mail account for my dsl line and I use it heavily. I don't want to switch. Shouldn't have to in my opinion.
    I was in the Promenade in Santa Monica earlier, was going to ask a "Genius", but the wait to see one was ridiculous. couldn't get an appointment till Monday. I'll wait till I'm back home to go the apple store I guess. It just frustrates me because I seriously doubt they can do anything at the store I haven't done already.

  • I can't send email after iOS7 update...

    I can't send email after the iOS7 update....this is a show stopper for me.   When is a fix expected?

    First it would help if you explain exactly what happens when you send an email. 
    Do you get an error message?
    If so what does the message say?
    The abilitly to send or receive emails does not fall on Apple or the IOS 7.
    You email provider gives you that ability.
    Double check and make sure your outgoing mail server is correct.

  • Can not send emails after ML update

    I am unable to send emails after updating to Mountain Lion. Four email accounts, same problem: All settings are unchanged, but SMTP servers for outgoing mail are set as passive. No problem with incoming emails. Any suggestions?

    I thought they might be. Apple seems to forget about POP accounts, and most problems seem to occur in them.
    Do you have a backup before upgrading?
    Did Mail go through the upgrade process the first time you opened Mail after the installation? Sounds like something may have gone wrong.
    All mail accounts and emails are stored in you user/Library/Mail/V2 folder. If you have a time machine backup, just restore that V2 folder from before the upgrade (close Mail first) and see if that fixes the problem.
    To see your Library folder, click on the desktop to make it active, then go to the menu at the top, select Go, then Go to Folder and type or copy and paste
    ~/Library
    Then go to the Mail folder and open it and click on Time Machine - restore the V2 folder from before the backup

  • HT4864 I cant send email after the IOS 7. I receive all emails normaly in the outlook 2011, bus I cant receive.

    I  cant send email after the IOS 7. I receive all emails normaly in the outlook 2011, bus I cant receive. What can I do?

    Update - I now have it working.
    am not really sure what exactly fixed it.
    I changed a lot of things but my setup now has the following which I think fixed.
    outgoing server  - p06-smtp.mail.me.com
    override default port checked - port now 587
    on more options button changed it to "use incoming server info".

  • Hi, I can't send email after installed maverick with mail

    hi, I can't send email after installed maverick with mail
    Thanks

    OS X Mail: Troubleshooting sending and receiving email messages

  • TS3276 I lost the ability to send email after upgrading to maverick.

    I lost the ability to send email after upgrading to maverick.  Has anyone  else had this problem?

    Mail troubleshooting - Yosemite
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

  • HT201309 Cant send email after upgrade on 8.2 ios

    cant send email after 8.2 ios upgrade

    Hi vic0215, 
    Thanks for contributing to the Apple Support Communities. 
    It sounds like you're not able to send email after updating iOS to the latest version. Be sure to try the troubleshooting steps at this link:
    Get help with Mail on iPhone, iPad, and iPod touch - Apple Support
    The tips here can help you send mail from your iPhone again. 
    All the best,
    Jeremy 

  • Sending email after deleting the records in a table

    Hi
    I am deleting the records in a table. After deleting the records,
    i want to send an email to another person. I am planning to follow this steps.
    1. Create a trigger on the table(AFTER DELETE ON table FOR EACH ROW)
    to copy the deleted records to temporary table.
    2. Read the temporary table and send an email.
    Is there any other way we can do with out creating temporary table ?.
    Govind

    I don't know what you plan to use to send the mail but here's a solution that would work.
    -- Create a send mail procedure
    create or replace procedure send_mail (
    sender      IN VARCHAR2,
    recipient   IN VARCHAR2,
    message     IN VARCHAR2)
    IS
      mailhost VARCHAR2(30) := 'localhost';
      mail_conn utl_smtp.connection;
    BEGIN
    mail_conn :=  utl_smtp.open_connection(mailhost, 25);
      utl_smtp.helo(mail_conn, mailhost);
      utl_smtp.mail(mail_conn, sender);
      utl_smtp.rcpt(mail_conn, recipient);
      utl_smtp.data(mail_conn, message);
      utl_smtp.quit(mail_conn);
    END;
    /-- Create the trigger to email deleted rows
    create or replace trigger email_del_rows
    after delete on <table>
    for each row
    declare
    msg varchar2(2000);
    begin
    msg := 'COL1  COL2  COMPANY NAME  DATE'||chr(10);
    msg := msg||:old.col1||'    '||:old.col2||'    '||:old.company_name||'       '||:old_date|| chr(10);
    msg := msg||'END OF FILE';
    send_mail('SENDER','[email protected]',msg);
    end;
    /You can make it look pretty but you get the basic idea.

  • Send email when first record updated problem

    Hi guys i have problem
    this code send email based on timer every 5 minutes
    it working ok but my problem i need to determine first rcord updated not inserted
    and send email this is starting work
    this is my code
    ---timer1_Tick---
    Sales.SalesClass SalesClass1 = new Sales.SalesClass();
    DataTable dt = SalesClass1.ShowSalesData("Data Source=192.168.1.5;Initial Catalog=Altawi-last06-01-2015;User ID=admin;Password=123");
    dataGridView1.DataSource = dt;
    dataGridView1.Refresh();
    namespace Sales
    class SalesClass
    public DataTable ShowSalesData(string ConnectionString)
    SqlConnection con = new SqlConnection(ConnectionString);
    SqlCommand cmd = new SqlCommand();
    cmd.Connection = con;
    cmd.CommandType = CommandType.Text;
    cmd.CommandText = "showsales1";
    SqlDataAdapter da = new SqlDataAdapter();
    da.SelectCommand = cmd;
    DataSet ds = new DataSet();
    da.Fill(ds);
    DataTable dt = ds.Tables[0];
    return dt;
    SELECT     ROW_NUMBER() OVER (ORDER BY dbo.[Jeddah-Live$Sales Header].No_) AS [م], dbo.[Jeddah-Live$Sales Line].[Document No_] AS 'رقم الطلب',
    dbo.[Jeddah-Live$Sales Header].[Bill-to Name] AS 'العميل', dbo.[Jeddah-Live$Sales Line].Area AS 'نوع الصبه', dbo.[Jeddah-Live$Sales Line].Description AS 'البيان',
    dbo.[Jeddah-Live$Sales Header].[Pump No_] AS 'المضخه', CAST(ROUND(dbo.[Jeddah-Live$Sales Line].Quantity, 0, 1) AS int) AS 'المطلوب',
    CAST(ROUND(dbo.[Jeddah-Live$Sales Line].[Quantity Shipped], 0, 1) AS int) AS 'المصبوب', CAST(ROUND(dbo.[Jeddah-Live$Sales Line].[Outstanding Quantity], 0,
    1) AS int) AS 'المتبقى '
    FROM         dbo.[Jeddah-Live$Sales Header] INNER JOIN
                          dbo.[Jeddah-Live$Sales Line] ON dbo.[Jeddah-Live$Sales Header].No_ = dbo.[Jeddah-Live$Sales Line].[Document No_] AND
                          dbo.[Jeddah-Live$Sales Header].[Sell-to Customer No_] = dbo.[Jeddah-Live$Sales Line].[Sell-to Customer No_]
    The code above not have any problem and working
    When first record updated send email
    Example to show
    orderno   quantity  shipped quantity
    12            20               0
    13            30               0
    14            25               0
    15           22                0
    suppose order no 14 shipped quantity updated be 10 (meaning 0 be 10
    then send email with starting work
    after this any updated to any record not send
    no problem i dont need any send email code but how to get record updated first

    Hi guys i have problem
    this code send email based on timer every 5 minutes
    it working ok but my problem i need to determine first rcord updated not inserted
    and send email this is starting work
    this is my code
    ---timer1_Tick---
    Sales.SalesClass SalesClass1 = new Sales.SalesClass();
    DataTable dt = SalesClass1.ShowSalesData("Data Source=192.168.1.5;Initial Catalog=Altawi-last06-01-2015;User ID=admin;Password=123");
    dataGridView1.DataSource = dt;
    dataGridView1.Refresh();
    namespace Sales
    class SalesClass
    public DataTable ShowSalesData(string ConnectionString)
    SqlConnection con = new SqlConnection(ConnectionString);
    SqlCommand cmd = new SqlCommand();
    cmd.Connection = con;
    cmd.CommandType = CommandType.Text;
    cmd.CommandText = "showsales1";
    SqlDataAdapter da = new SqlDataAdapter();
    da.SelectCommand = cmd;
    DataSet ds = new DataSet();
    da.Fill(ds);
    DataTable dt = ds.Tables[0];
    return dt;
    SELECT     ROW_NUMBER() OVER (ORDER BY dbo.[Jeddah-Live$Sales Header].No_) AS [?], dbo.[Jeddah-Live$Sales Line].[Document No_] AS '??? ?????',
    dbo.[Jeddah-Live$Sales Header].[Bill-to Name] AS '??????', dbo.[Jeddah-Live$Sales Line].Area AS '??? ?????', dbo.[Jeddah-Live$Sales Line].Description AS '??????',
    dbo.[Jeddah-Live$Sales Header].[Pump No_] AS '??????', CAST(ROUND(dbo.[Jeddah-Live$Sales Line].Quantity, 0, 1) AS int) AS '???????',
    CAST(ROUND(dbo.[Jeddah-Live$Sales Line].[Quantity Shipped], 0, 1) AS int) AS '???????', CAST(ROUND(dbo.[Jeddah-Live$Sales Line].[Outstanding Quantity], 0,
    1) AS int) AS '??????? '
    FROM         dbo.[Jeddah-Live$Sales Header] INNER JOIN
                          dbo.[Jeddah-Live$Sales Line] ON dbo.[Jeddah-Live$Sales Header].No_ = dbo.[Jeddah-Live$Sales Line].[Document No_] AND
                          dbo.[Jeddah-Live$Sales Header].[Sell-to Customer No_] = dbo.[Jeddah-Live$Sales Line].[Sell-to Customer No_]
    The code above not have any problem and working
    When first record updated send email
    Example to show
    orderno   quantity  shipped quantity
    12            20               0
    13            30               0
    14            25               0
    15           22                0
    suppose order no 14 shipped quantity updated be 10 (meaning 0 be 10
    then send email with starting work
    after this any updated to any record not send
    no problem i dont need any send email code but how to get record updated first

  • Sending emails for each record from tabular form

    I currently have a requirements management tabular form that used to update or set job requirements inactive and/or covered.
    We're a staffing agency and have salesmen across the country that will use this tabular form to quickly manage their requirements to mark them as covered or inactive if the position has been filled.
    The multi-row update works fine since the form was built using the wizard, but I need to be able to send out an email for each record that's been marked as covered in the tabular form.
    How can this be accomplished?
    I'm running Oracle 12c and Apex 4.2.0 on a windows 2008 R2 server.
    Thanks again.

    Greg,
    I took a different approach from what I originally suggested.  Since the tabular form is displaying only reqs that eligible to be covered, I chose to construct a process that would read the database after the reqs table was updated.  The code should find recent reqs covered by the salesman and then send out an email for each covered req.
    Since I cannot see the data structure of your reqs table, I guessed the data type and size for the local variables in the DECLARE section, you many need to adjust these.
    Give this code a shot and let's see where we get.  By the way, the naming conventions of your database are in need of naming standards.
    The process needs to occur After Submit and after the Automatic Row Processing (DML) process that is updating the reqs table.  Make sure that the process sequence number is greater than the Automatic Row Processing (DML) sequence number.
    DECLARE
       l_id           NUMBER;
       l_index        NUMBER;
       l_vc_arr2      apex_application_global.vc_arr2;
       lc_message     VARCHAR2 (4000);
       l_pkey         NUMBER;
       l_date_wrote   DATE;
       l_sales        VARCHAR2 (100);
       l_client       VARCHAR2 (100);
       l_job          VARCHAR2 (100);
       l_1or2         VARCHAR2 (100);
       l_rate         NUMBER;
       l_notes        VARCHAR2 (4000);
    BEGIN
       FOR c1
          -- Retrieve reqs primary key that have been covered
          -- in the last 2 seconds by the salesman
       IN (SELECT pkey
             INTO l_pkey
             FROM reqs
            WHERE     SYSDATE < (date_wrote + 1 / 46200)
                  AND active = 'Active'
                  AND reqs.sales = :p12_sales
                  AND covered IS NOT NULL)
       -- Send an email for each req that has been covered
       LOOP
          SELECT c1.date_wrote,
                 c1.sales,
                 c1.client,
                 c1.job,
                 c1.notes,
                 c1.who,
                 c1.1or2,
                 c1.rate
            INTO l_date_wrote,
                 l_sales,
                 l_client,
                 l_job,
                 l_notes,
                 l_who,
                 l_1or2,
                 l_rate
            FROM reqs
           WHERE pkey = l_pkey;
          lc_message := 'Date Written   :' || l_date_wrote || CHR (10);
          lc_message := lc_message || 'Sales          :' || l_sales || CHR (10);
          lc_message := lc_message || 'Client         :' || l_client || CHR (10);
          lc_message := lc_message || 'Position       :' || l_job || CHR (10);
          lc_message := lc_message || '#1 or #2       :' || l_1or2 || CHR (10);
          lc_message := lc_message || 'Rate           :' || l_rate || CHR (10);
          lc_message := lc_message || 'Notes      :' || l_notes || CHR (10);
          l_id :=
             apex_mail.send (
                p_to     => '[email protected]',
                p_from   => 'DO_NOT_REPLY@REQS',
                p_subj   =>    ''
                            || l_who
                            || ' Has Covered '
                            || l_job
                            || ' at '
                            || l_client
                            || CHR (10),
                p_body   => lc_message);
          COMMIT;
          apex_mail.push_queue ();
       END LOOP;
    END;
    Jeff

  • Cannot send email after update on iphone 5

    cannot send email from one account after update,  states my password and/or user name incorrect.  I have it written down,it's not incorrect.

    After the iOS 7 update, in order to send email from my iPhone5 and my daughters (also from our iPads) I had do follow Apples reset instructions. Hold the HOME buttton and the START/AWAKE button until your device restarts and you see the Apple logo when your device restarts. You do not have to swipe the message bar which shows up sometimes as your iPhone is shutting down. Sadly to say, but on my daughters iPhone 5, I had to do this 5 times.
    If you live near an Apple store, make them do it so that someone at Apple will send a fix for other people. I looked for a simple way to contact Apple and there is none. There is a series of prompts and links that are time consuming to be able to reach support about even a simple problem.

  • Mail 3.0 cannot send email after clean install

    mail does not manage to send mail after leopard was installed via a clean install. It seems to work for upgraded machines, but unfortunately for me, I prefer the clean install.
    The problem is, that the SMTP-server simply rejects sending attempts from mail. mail then simply says "cannot send message using the server ...". I got suspicious when I entered a wrong password as then mail says that authentication failed (so the communication has to work somehow).
    So I worked on getting the server logs and they say the following:
    +Helo command rejected: need fully-qualified hostname; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<Core>+
    Seems like my computer send only the computers name as hostname and not the .local part any more. Systems which have been upgraded instead of a clean install do it "right" meaning they send hostname.local instead of just hostname which gets accepted by the smtp-server.
    So the question is, where is the problem here? I do not really know what would be the right behavior regrading the computers name and hostname but I realize that 10.5 differs here from 10.4 leading to the problem above. My workaround in the moment is using Thunderbird which is quite sad after buying and upgrading to the new system...

    I am running into the same issue. My insightbb account wont send messages. My yahoo account on the other hand, works fine. Heck, Mail wont even let me setup the insightbb account. Sometimes i can, but it rejects my username. I have to use thunderbird to send email from my insightbb account

  • Outlook 2011 won't send emails after updating to 10.8.5

    After updating to 10.8.5, I can no longer send emails out of my .mac account. I am using Outlook 2011 and have double checked the outgoing server settings and everyting checks out fine. Seems to be a compatability issue now with Outlook and iOS. Can anyone confirm this or know how to fix this problem? Thanks

    BTW - the error message that comes up is: "5.7.8 Bad username or password (Authentication failed)..."

  • ABAP-Workflow : which way to send email after creating Purchase Order ?

    Hi expert,
    I'm a new workflow so I have not  understood about workflow . Please help me ...
    Today, I have recieved a request from client as below:
       +    SAP system auto send a email to USER B after  creating Purchase Orders by User A.
       *++.  USer B open email and click on the link in his/her email and open new transaction to Release this Purchase Order.*
    Could you please help me how to do that?
    Thank you so much all.

    Hi ,
    Thank you so much for your quick response.
    I found in SAP system  2 workflows:
                WS20000075 : Release of purchase order
                WS11000013 : Complete Purchase Order
    Open  transaction "SWDD" I have added the step  "Send Email" --> Active and Excute  --> enter PO number --> system auto send email to USER B.
    But I want the system auto semd email after clicking SAVE in  transaction"ME21N" , No need enter PO number in SWDD .
    How to integrate between ME21N and Workflow? Could you please helpme step by step or sample to do that.?
    Thank you so much .

Maybe you are looking for

  • Report using smart forms as the print module

    Hi I have to develop a report in order to print some data of the purchase orders after processing, in a given layout. To achieve this I have the relaxation to use smartforms to develop the layout. The processed data for multiple orders will be passed

  • Problem in BOM

    Hi Friends,     We are using some 10000 materials header and item.I want to know the validity of the materials.Will you please tell me wwere we can see the validity of all the materials or will you please tell me the table. Advance Thanks, Martin

  • Hard Drive Not detected after replacing DC In Board

    So after more than a year of jiggling an easliy bent AC adapter in the port to get my ibook G4 to charge it just quit and would not charge. I suspected it was the slightly loose DC in port (having no idea what was behind the little hole) so I took it

  • How to lock WBS lement in a program or user to avoid double posting in FBS1

    Hi Experts, I have an issue, i need to lock WBS element to a report or user to avoid double posting if other user is also running the same report. Hope to hear answers. Thanks,

  • Prolem building DB's in Oracle 8i over nt 4.0

    Dear All, After finishing installation of 8i over NT 4.0. when i am trying to create Database its giving an Error " ORA-04031: Unable to allocate 93530872 bytes of shared memory " shared pool " unknown object " sga heap " db_block_buffers. Pls help m