473,473 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sending email in VB6

I use Mapi to send emails with attachments.
When I use the
MAPISession1.DownLoadMail = False
MAPISession1.SignOn

With Me.MAPIMessages1
.SessionID = MAPISession1.SessionID
.MsgIndex = -1
.Compose

.MsgSubject = strSubject
'.RecipType = mapToList
.RecipDisplayName = strAddressTo
.RecipAddress = strTo

.AddressEditFieldCount = 4
.MsgNoteText = strMsg
.AttachmentPathName = Maalfil
.Send (True)

When I display the email the receipient is listed with <> example: Reidar
<re****@eivon.no>
This fails when sending.
If I change the receipient to Reidar (re****@eivon.no) it works OK.
And it seenms that I can't change from < >to () by code.
(I know that I could use vb.net, but in this case I want to use VB6)

regards
reidarT
Nov 29 '05 #1
1 1101
ReidarT wrote:
I use Mapi to send emails with attachments.
When I use the
MAPISession1.DownLoadMail = False
MAPISession1.SignOn

With Me.MAPIMessages1
.SessionID = MAPISession1.SessionID
.MsgIndex = -1
.Compose

.MsgSubject = strSubject
'.RecipType = mapToList
.RecipDisplayName = strAddressTo
.RecipAddress = strTo

.AddressEditFieldCount = 4
.MsgNoteText = strMsg
.AttachmentPathName = Maalfil
.Send (True)

When I display the email the receipient is listed with <> example: Reidar
<re****@eivon.no>
This fails when sending.
If I change the receipient to Reidar (re****@eivon.no) it works OK.
And it seenms that I can't change from < >to () by code.
(I know that I could use vb.net, but in this case I want to use VB6)

regards
reidarT


There is a VB6 newsgroup. You have posted this to a vb.net group.
Probably best to post it in vb6 group.
Nov 29 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Paul Lamonby | last post by:
Hi, I am sending a file from the server as an email attachment. The file is being attached no problem and sending the email, but I get an error when I try to open it saying it is corrupt....
13
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP server using the SmtpMail class. However, using...
7
by: Marcin | last post by:
Hello all! A few years ago I created a form with button which let me send an email with an attachment. It was created in Access 97. Now I would like to move this application into Access 2003....
17
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate...
2
by: Mark | last post by:
I have a service that I've built that runs on our web server. The web service has a reference to the System.Web namespace so it can use the classes titled: MailMessage SmtpMail My web...
6
by: Eduardo Rosa | last post by:
Somebody knows how I queue email using .Net? thanks a lot
1
by: xin.yadong | last post by:
Hi: I have a shared function for sending Email using SMTP. It works fine in a ASP.NET web application. But when I use it in a VB.Net Windows application, it always gave me an error: "Could not...
6
by: Jack | last post by:
Hi, I am still new to .NET so, i'm sorry if my question is a bit too simple :-) I would like to know what is the "best-practice-way" of sending email from asp.net (VbScript). I want to make a...
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
6
by: Chocolade | last post by:
Hi, Im using System.Net.Mail to send email in my application it was working great without any problems untill this morning after like 20-30 tries it was sending the email ok then suddenly this...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.