ivan
  • ivan
  • 100% (Exalted)
  • Administration Topic Starter
14 years ago
Introduction

EASendMail is a SMTP component which supports all operations of SMTP/ESMTP protocols (RFC 821, RFC 822, RFC 2554). This tutorial covers everything of sending email with EASendMail in VB6.

A simple VB 6.0 project
Send email over SSL connection
Send email using Gmail account
Send email using Yahoo account
Send email using Hotmail/MSN Live account
Send email directly without SMTP server(MX DNS lookup)
Send HTML email
Send email with attachment
Send email with embedded images
Send email with digital signature (S/MIME)
Email encryption (S/MIME)
Send email in asynchronous mode
Send email with multiple threads (Mass Mail)
Total sample projects

Click here to read full tutorial ... 

If you have any comments or questions about above example codes, please add your comments here.
markariels
13 years ago
Hi guys,

Is there any way you can change the sender name? I tried using:

osmtp.FromAddr = "JustNameNoEmailAddress"

but it doesn't send the mail, and when I looked on Outlook, the email message is saved in the Drafts Folder. (I'm using EWS)

Thanks!
ivan
  • ivan
  • 100% (Exalted)
  • Administration Topic Starter
13 years ago

Hi guys,

Is there any way you can change the sender name? I tried using:

osmtp.FromAddr = "JustNameNoEmailAddress"

but it doesn't send the mail, and when I looked on Outlook, the email message is saved in the Drafts Folder. (I'm using EWS)

Thanks!

markariels wrote:



Hi, You should use

oSmtp.From = "your name"
oSmtp.FromAddr = "your address"
markariels
13 years ago



Hi, You should use

oSmtp.From = "your name"
oSmtp.FromAddr = "your address"

ivan wrote:





Tried this as well (in which it successfully send the mail) but it will not change the sender's name once I read the message from Recipient's end.

Thanks anyway...
ivan
  • ivan
  • 100% (Exalted)
  • Administration Topic Starter
13 years ago



Hi, You should use

oSmtp.From = "your name"
oSmtp.FromAddr = "your address"

markariels wrote:





Tried this as well (in which it successfully send the mail) but it will not change the sender's name once I read the message from Recipient's end.

Thanks anyway...

ivan wrote:




Hi, I just did a test. I am sorry to say it is a Exchange EWS limit, the sender name will be changed to the display name in AD automatically no matter you set other name in mail header.

So you have to change your display name in your Exchange Active Directory manually.
markariels
13 years ago
Yeah, that's what I thought! Thanks...
kkk
  • kkk
  • 50.75% (Neutral)
  • Newbie
8 years ago
Hi,

Can you please let me know how to add multiple recipients in
oSmtp.AddRecipientEx "support@emailarchitect.net", 0

I have list extracted from excel columns and stored in a variable, I would like to send the emails by using that variable.
Please advise.
Thank you!
ivan
  • ivan
  • 100% (Exalted)
  • Administration Topic Starter
8 years ago

Hi,

Can you please let me know how to add multiple recipients in
oSmtp.AddRecipientEx "support@emailarchitect.net", 0

I have list extracted from excel columns and stored in a variable, I would like to send the emails by using that variable.
Please advise.
Thank you!

Originally Posted by: kkk 



You can run this method multiple times to add multiple addresses.

oSmtp.AddRecipientEx "support0@emailarchitect.net", 0
oSmtp.AddRecipientEx "support1@emailarchitect.net", 0

and ...

you can also add multiple recipients like this:

oSmtp.AddRecipientEx "support0@emailarchitect.net, support1@emailarchitect.net", 0


smuchakurti
7 years ago
Hi,

I am trying to run the below script on SQL Server 2012 query analyzer that creates 'EASendMailObj.Mail' object using 'sp_OACreate', but getting: '-2147221005': 'Invalid class string' error.

Could you please look into this?

Script:

DECLARE @hr int
DECLARE @oSmtp int
DECLARE @result int
DECLARE @description nvarchar(255)

EXEC @hr = sp_OACreate 'EASendMailObj.Mail',@oSmtp OUT
print @hr

If @hr <> 0
BEGIN
EXEC @hr = sp_OAGetErrorInfo @oSmtp, NULL, @description OUT

IF @hr = 0
BEGIN
PRINT @description
END

RETURN
End
ivan
  • ivan
  • 100% (Exalted)
  • Administration Topic Starter
7 years ago

Hi,

I am trying to run the below script on SQL Server 2012 query analyzer that creates 'EASendMailObj.Mail' object using 'sp_OACreate', but getting: '-2147221005': 'Invalid class string' error.

Could you please look into this?

Script:

DECLARE @hr int
DECLARE @oSmtp int
DECLARE @result int
DECLARE @description nvarchar(255)

EXEC @hr = sp_OACreate 'EASendMailObj.Mail',@oSmtp OUT
print @hr

If @hr <> 0
BEGIN
EXEC @hr = sp_OAGetErrorInfo @oSmtp, NULL, @description OUT

IF @hr = 0
BEGIN
PRINT @description
END

RETURN
End

Originally Posted by: smuchakurti 



It seems that you didn't install EASendMail on the SQL server.
If SQL server is running on a remote server, you should install it on remote server as well.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.