If you want to attach multiple attachment, you will need to insert another addAttachment statement. For example With newMail .Subject = "Hello World" .From = "sender Email" .To = "recipient Email" .CC = "" .BCC = "" .TextBody = "This is a test email." .AddAttachment "directory of file1" .AddAttachment "directory of file2" .AddAttachment "directory of file3" End With
Thanks for the video. Is it true that this method will no longer be supported, but should be switched to OAuth 2.0? Do you know how to get started with this?
Unfortunately I don't know the best way to use OAuth2 protocol in VBA, but if you have some experience with Python, OAuth2 is definitely the way to go to send email with Gmail.
When my email id is wrong (i.e, not found in mail address book),the macro stops running. What can be done to prevent thia as this prevents from sending my others mails to users in the same column??
Hi.. I have more than one files to send to the same email id - One attachment per email. Can i loop through the files in the folder to send as per my expectations
If you know any programming, you can use Microsoft Graph API to to manage your Outlook tasks. learn.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0
When i want to sent message to email address on cell in sheet what will the code be , because .To = Range("D15") dont work and this is the range off the cell
@@jiejenn Hi Jie, I am looking to attach both an image in the body (saved from a printing area in a worksheet) and a PDF as an attachment. I would love to pick your brain on this one :)
it's look's great Sir, I'm getting error when I run this code Error: The SMTP server name is required, and was not found in configuration source. I gave the same code what you gave, Can you help me on this pls
@@jiejenn thnak you for your reply... I entered exactly what your chatgpt instructions produced and I dont see anything missing...could the same question get 2 results for each of us?
Hello, Thank you for the tutorial. Also can you upload a vba tutorial on how to download attachment from Gmail in specific format and fill up the mail details in 1 excel macro file.
When my email id is wrong (i.e, not found in mail address book),the macro stops running. What can be done to prevent thia as this prevents from sending my others mails to users in the same column??
If you want to attach multiple attachment, you will need to insert another addAttachment statement. For example
With newMail
.Subject = "Hello World"
.From = "sender Email"
.To = "recipient Email"
.CC = ""
.BCC = ""
.TextBody = "This is a test email."
.AddAttachment "directory of file1"
.AddAttachment "directory of file2"
.AddAttachment "directory of file3"
End With
Thanks for the video. Is it true that this method will no longer be supported, but should be switched to OAuth 2.0? Do you know how to get started with this?
Unfortunately I don't know the best way to use OAuth2 protocol in VBA, but if you have some experience with Python, OAuth2 is definitely the way to go to send email with Gmail.
Nice lesson, thanks for posting it! Can you show how to manipulate with different recepients?
With this code is it possible to send 500 more E-mails, or would it be blocked by the provider if you exceed this limit?
500 is a small number I won't worry about it, but I would suggest you separate them into batches between intervals.
Hi, very good! I have a question, how can I only prepare mail without send immediatly, and see themm in the gmail draft folder? Many thanks.
I got error: & err.description, vbinformation in my case, what can be wrong?
When my email id is wrong (i.e, not found in mail address book),the macro stops running. What can be done to prevent thia as this prevents from sending my others mails to users in the same column??
... hahaha ... I'm giddy with excitement. Thank you!
Hi! I am getting this error when I try to run it.
Automation error
%1 is not a valid Win32 application.
I am getting the server response was not available error. Please Help
The transport failed to connect to the server, I am using gmail. Pleas help me. Using Excel 2016, 64 bits
Hi.. I have more than one files to send to the same email id - One attachment per email. Can i loop through the files in the folder to send as per my expectations
Mr. Jenn, is it possible to run this script to send email from outlook account without an outlook app?
If you know any programming, you can use Microsoft Graph API to to manage your Outlook tasks.
learn.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0
Can I use for loop to send the mail to different people
When i want to sent message to email address on cell in sheet what will the code be , because .To = Range("D15") dont work and this is the range off the cell
Not enough information to help. Maybe change to =Range("D15").value.
Hi! Pretty good! I have a question, do you know how to put that image in the body of the email too?
I haven't try inserting an image to the email body. Will probably experiment a bit first.
@@jiejenn Hi Jie, I am looking to attach both an image in the body (saved from a printing area in a worksheet) and a PDF as an attachment. I would love to pick your brain on this one :)
When i run it it gives error of sendingusing configuration value as invalid
Error- The system cannot find the path specified'. This error is showing while the code can someone help me on this ?
what is the msoconfigURL how did i get this for my email ID??
Hi, can send a more mail in one click, from a Excel mailing LIST ?
Would this code work on visual studio?
Error : :The system cannot nind the files spicified"
Please solution
it's look's great Sir, I'm getting error when I run this code
Error: The SMTP server name is required, and was not found in configuration source.
I gave the same code what you gave,
Can you help me on this pls
Please refer your question on Stack Overflow.
I get "Error: Access is denied" when trying to send by gmail. Any thoughts on what is going wrong?
Gmail no longer supports unsafe sources and therefore blocks SMTP requests from excel
it says Error: The process cannot access the file because it is being used by another process. help please
I got the following error message. "Error: The requested body part was not found in this message" can you help please?
Your request body is missing a thing or two, that's my guess.
@@jiejenn thnak you for your reply... I entered exactly what your chatgpt instructions produced and I dont see anything missing...could the same question get 2 results for each of us?
@@StevenSchiff-rg5ic hard to tell without looking at your script.
Hi! Preety good! I have a question, how can I put that image in the body too?
The transport failed to connect to the server, I am using gmail. Pleas help me
Hello there I always encounter this "The “SendUsing” configuration value is invalid" is there any workaround?
What value are you providing to the SendinfUsing property?
@@jiejenn all is good i found out there are lapses on the spelling, all is good. More power!!!
i am getting error for " SendUsing Configuration value is invalid" please suggest what should i do next
Makes sure you provide the correct credential info.
i have error : Error The "Sendusing" configuration value is invalid
i write it correct
.Item(msconfigurl & "/sendusing") = 2
Probably a typo somewhere in your script.
good morning is there a parameter to program the email for postponed sending?
You can look into Application.Wait function.
@@jiejenn good morning you could give me some more information that I'm not very practical thanks
Hello, Thank you for the tutorial. Also can you upload a vba tutorial on how to download attachment from Gmail in specific format and fill up the mail details in 1 excel macro file.
I will look into it.
Thank you... It would be very helpful if that is possible.
Hi! Can you share how we can send it to a list of emails in excel?
You can create a list and iterate each email address.
How is the highlighted font of ur code is red instead of blue...how did u do that
Under Tools, go to Editor Format tab, from there, you can format the text.
@@jiejenn thanks🙂
Does it stillwork
It should.
thanks dude.!!! this was really amazing..
how to read emails from Gmail box using VBA?
Thank you
how to add a loop to use excel list with multiple recepients and their relevant attachments?
You can make the subroutine serves as a function. To add multiple attachments, I'm going to have do some research.
thanks it really helped a lot
So now how do I make an Excel spreadsheet in my Gmail?
Not sure if I understand your question.
Sadly doesn't work with excel 64-bit.
I did the video using Office 64bit, so Excel 64bit should work.
When my email id is wrong (i.e, not found in mail address book),the macro stops running. What can be done to prevent thia as this prevents from sending my others mails to users in the same column??