-
July 4th, 2011, 01:35 PM
#1
automatically send an email to the email address in the body of an Outlook email
Using Outlook 2010, I receive about 5 emails a day from the same sender everyday. These emails contain only one email in the body of the email that I am manually copy and paste into a new email and send myself. I am thinking that with Outlook Rules and Visual Basic I can make it so when I receive the email from a particular sender Outlook can automatically find or detect and extract the email in the body and auto send a template email to that email address.
I hope I am making sense but to keep it simple, basically, I want to auto email the email address located in the body of an outlook email and not the sender.
-
July 4th, 2011, 03:40 PM
#2
Re: automatically send an email to the email address in the body of an Outlook email
Your post is unclear in one place it sounds like you want to send the body of an email you have received to yourself and in another place it sounds like you are wanting to extract an email address from the message and send to that address.
The first step in getting the help you seek is to clearly phrase the question.
You should also show the code that you have written and explain where you are having a problem.
Always use [code][/code] tags when posting code.
-
July 4th, 2011, 04:54 PM
#3
Re: automatically send an email to the email address in the body of an Outlook email
Re: automatically send an email to the email address in the body of an Outlook email
Microsoft blocked access to that in Office 2007 (I believe), after script-kiddies used other peoples OUTLOOK account to send 100's of emails per minute. Now there's a rule. Post more than every 5 minutes, and it will countdown.
There used to be a 'TOOL' that would click the button, when it appeared, thereby bypassing the TIMER.
Up to the current day, MS remedied that, as well...
Most ISP's allow you to SEND MAIL directly from THEIR SERVER. That's the right way.
-
March 10th, 2012, 12:34 AM
#4
Re: automatically send an email to the email address in the body of an Outlook email
the 2nd option you posted is what I was trying to explain.
-
March 10th, 2012, 01:47 AM
#5
Re: automatically send an email to the email address in the body of an Outlook email
Using Outlook 2010, I receive about 5 emails a day from the same sender everyday. These emails contain only one email in the body of the email that I am manually copy and paste into a new email and send myself. I am thinking that with Outlook Rules and Visual Basic I can make it so when I receive the email from a particular sender Outlook can automatically find or detect and extract the email in the body and auto send a template email to that email address.
I hope I am making sense but to keep it simple, basically, I want to auto email the email address located in the body of an outlook email and not the sender.
Can you post the code please ?it is much better to understand the
forums members of Codeguru .
-
March 10th, 2012, 02:06 AM
#6
Re: automatically send an email to the email address in the body of an Outlook email
This works on my site (using Net 2.0) and ASP.Net
Code:
Imports System.Net.Mail
Imports System.String
Imports System
Imports System.Net
Imports System.IO
Imports System.Text
Imports Microsoft.VisualBasic
Partial Class contact
Inherits System.Web.UI.Page
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Try
If Request.UrlReferrer.Host <> Request.Url.Host Then
Return
End If
Dim msg As New MailMessage
msg.To.Add(ConfigurationManager.AppSettings("MailingListEmailTo").ToString)
msg.From = New MailAddress(ConfigurationManager.AppSettings("SiteEmail").ToString)
msg.Subject = "A contact form has been submitted"
msg.IsBodyHtml = True
Dim out As String = ""
If Len(txtAdditional.Text) > 300 Then
out = Left(txtAdditional.Text, 300)
Else
out = txtAdditional.Text
End If
msg.Body = "A new contact form was filled out on the website.<br><br>" & _
Now.ToString & "<br><br>" & _
"Name: " & txtName.Text & "<br>" & _
"Company: " & txtCompany.Text & "<br>" & _
"Email: " & txtEmail.Text & "<br>" & _
"Address: " & txtAddress.Text & "<br>" & _
"Phone: " & txtPhone.Text & "<br>" & _
"Preferred contact method: " & ddlContactMethod.SelectedItem.ToString & "<br>" & _
"Primary business: " & txtBusiness.Text & "<br>" & _
"Time frame: " & txtTimeframe.Text & "<br>" & _
"Heard about from: " & ddlHearAbout.SelectedItem.ToString & "<br>" & _
"Additional: " & out
Dim smtpClient As New SmtpClient
smtpClient.Host = ConfigurationManager.AppSettings("SMTPServer")
smtpClient.Send(msg)
Response.Redirect("default.aspx")
Catch ex As Exception
End Try
End Sub
End Class
Click the button, and I get an email (from my site!)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|