I am using email_send2 to send emails form my virtual web server, which is running Alpha V version 7 using a web form. Everything is working fine, except I cannot get the "from" field to work. It just shows the default from email address set in Alpha V on the server. I made a new profile with no "from" address in it and specified that profile, but the email was still sent from the other profile. Does anyone have an idea why it is not working? Another issue is that although I have set up an email profile previously and it is working, I cannot now "see" it on the server", although it is still working. I am running Alpha V Version 7 Build 4130.
Here is the code running within the web page:
Here is the code running within the web page:
Code:
dim email_addr as c dim tbl as P dim email_body_main as c dim email_subject as c dim email_close as c dim title as c dim name as c dim city as c dim state as c tbl = table.open("[PathAlias.ADB_Path]\rosterne_web") query.filter = "invoice_num = \"" + session.cinvoice_num + "\" " query.order = "" indx = tbl.query_create() email_addr=tbl.eval("E_mail") email_body_main = tbl.eval("Notes") email_subject=tbl.eval("New_field4") email_close=tbl.eval("New_field6") title=tbl.eval("title") Name=tbl.eval("familyname") City=tbl.eval("city") State=tbl.eval("state") tbl.close() dim email_body as c email_body="Dear Councilmember"+crlf(2)+email_body_main+crlf(2)+email_close+crlf(2)+alltrim(title)+" "+alltrim(Name)+crlf()+alltrim(City)+","+alltrim(State) email_send(email_addr, email_subject, email_body, "", "",comp_email, .F.) dim message as P dim tbl as p dim Email2 as c dim Salutation as c tbl = table.open("[Pathalias.ADB_path]\City_council_email.dbf") while .not. tbl.fetch_eof() Email2=tbl.eval("Email") Salutation=tbl.eval("Salutation") message.from = Email_addr email_body="Dear "+Salutation+crlf(2)+email_body_main+crlf(2)+email_close+crlf(2)+alltrim(title)+" "+alltrim(Name)+crlf()+alltrim(City)+","+alltrim(State) message.message = email_body message.to = Email2 message.subject = Email_subject email_send2(message,"", .T., .F.) tbl.fetch_next() end while tbl.close()
Comment