Link to home
Start Free TrialLog in
Avatar of mathu76
mathu76

asked on

Sending Formatted Email via ShellExecute() Problem?

Hi All

I am making a dialog based application.

In one of my DlgBoxes i need to take some input from the user and email the same at some address.

Now the problem is that i am not able to format the email body properly.

I have 3 edit boxes where i prompt the user to enter his name, his company name and his email address.

Using the ShellExecute(), i am able to fill correct entries in the to: cc: subject: editboxes but the real problem comes when i try to write the body content.

Under current circumstances name,company name and email address are being displayed on the same line whereas i want them to come in seperate lines as:

Name:               X
Company Name:       Y
Email Addrss:       X@y.com

Waiting for suggestions?

Regards

   

Avatar of tkalchev
tkalchev
Flag of Germany image

mailto:somemail@somedomain.com?Subject=SomeSubject&Body=Name%20%20:%20X%0ACompany%20Name%20%20:%20B%0AEmail%20Address%20:%20a@b.com
Avatar of mathu76
mathu76

ASKER

Thanks tKalchev for your suggestion in my dialog based mfc application i cannot do like this.

The point is that as a result of the user entering the text in the three edit boxes i have three CString objects to deal with (Name,Company Name and Email). so first i would need to do the formatting first and then only i think i can assign the resultant string to the Body variable.

Waiting for comments.
       
ASKER CERTIFIED SOLUTION
Avatar of tkalchev
tkalchev
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mathu76

ASKER

Thanx tKalchev for your comments.Your suggestion has helped me to solve my problem.
Thanx once again.

Regards