Unanswered: sending an email through google mail in Excel
Thanks to various peoples help I have used the code below:
Dim OL As Object
Dim EmailItem As Object
Dim Wb As Workbook
x = MsgBox("Are all the fields filled in?", vbYesNo)
If x = vbYes Then
Application.ScreenUpdating = False
Set OL = CreateObject("Outlook.Application")
Set EmailItem = OL.CreateItem(olMailItem)
Set Wb = ActiveWorkbook
.Subject = "JLR Work Request" & Now()
.Body = "Please find attached a JLR Work Request Form" & vbCrLf & _
"" & vbCrLf & _
.To = "CampaignIntegrationTeam@****.co.uk"
.Importance = olImportanceHigh 'Or olImprotanceHigh Or olImprotanceLow
Application.ScreenUpdating = True
Set Wb = Nothing
Set OL = Nothing
Set EmailItem = Nothing
This has made it so that I can send an email using a button. However I now need to do something similar but to send from google mail.
Is this possible and if so can you please explain simply as I am still learning?
I wouldn't have a clue whether it would be possible to do this via the web client but if you use either Windows Mail, or Outlook, you can configure your account settings to send and recieve Gmail emails using standard pop and smtp configurations (I've done it).
It's also possible using various other clients but I've never tried. If you wanted to do it this way, all the answers you need are here;